Class Match


  • public class Match
    extends Object
    Class representing a match.

    found = true, if a match has been detected

    if found = true then matchX and matchY represent the rounded coordinates of the center of the match

    • Constructor Detail

      • Match

        public Match​(boolean found)
        Constructor.
        Parameters:
        found - true, if a match has been detected
      • Match

        public Match​(boolean found,
                     int matchX,
                     int matchY)
        Constructor.
        Parameters:
        found - true, if a match has been detected
        matchX - x coordinate of the center of the match
        matchY - y coordinate of the center of the match
      • Match

        public Match​(boolean found,
                     int matchX,
                     int matchY,
                     byte[] visualization)
        Constructor.
        Parameters:
        found - true, if a match has been detected
        matchX - x coordinate of the center of the match
        matchY - y coordinate of the center of the match
        visualization - a Base64 encoded visualization image of the match
    • Method Detail

      • isFound

        public boolean isFound()
      • setFound

        public void setFound​(boolean found)
      • getX

        public int getX()
      • setX

        public void setX​(int matchX)
      • getY

        public int getY()
      • setY

        public void setY​(int matchY)
      • getVisualization

        public byte[] getVisualization()
      • setVisualization

        public void setVisualization​(byte[] visualization)
      • fromOccurrenceMatchingResult

        public static Match fromOccurrenceMatchingResult​(boolean found,
                                                         io.appium.java_client.imagecomparison.OccurrenceMatchingResult result,
                                                         double scalingFactor)
        Map a OccurrenceMatchingResult to a Match
        Parameters:
        found - has a match been found
        result - the OccurrenceMatchingResult
        scalingFactor - by how much has the image been scaled in regards to the original image (if a Match in regards to the scaled image is required this should be set to 1.0)
        Returns:
        Match
      • fromOccurrenceMatchingResult

        public static Match fromOccurrenceMatchingResult​(boolean found,
                                                         io.appium.java_client.imagecomparison.OccurrenceMatchingResult result)
        Map a OccurrenceMatchingResult to a Match
        Parameters:
        found - has a match been found
        result - the OccurrenceMatchingResult
        Returns:
        Match