Record Class VisualProcessingProvider.ScreenshotComparisonResult
java.lang.Object
java.lang.Record
com.shaft.gui.internal.image.VisualProcessingProvider.ScreenshotComparisonResult
- Record Components:
matched-truewhen the observed pixel difference is within the configured budgetdiffImage- encoded PNG highlighting the differing pixels, or an empty array whenmatchedistruediffPixels- number of pixels that differ after maskingdiffRatio-diffPixelsdivided by the total pixel count of the compared images
- Enclosing interface:
VisualProcessingProvider
public static record VisualProcessingProvider.ScreenshotComparisonResult(boolean matched, byte[] diffImage, long diffPixels, double diffRatio)
extends Record
Result of a pixel-level screenshot comparison against a baseline image.
-
Constructor Summary
ConstructorsConstructorDescriptionScreenshotComparisonResult(boolean matched, byte[] diffImage, long diffPixels, double diffRatio) Creates an instance of aScreenshotComparisonResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the value of thediffImagerecord component.longReturns the value of thediffPixelsrecord component.doubleReturns the value of thediffRatiorecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatched()Returns the value of thematchedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScreenshotComparisonResult
public ScreenshotComparisonResult(boolean matched, byte[] diffImage, long diffPixels, double diffRatio) Creates an instance of aScreenshotComparisonResultrecord class.- Parameters:
matched- the value for thematchedrecord componentdiffImage- the value for thediffImagerecord componentdiffPixels- the value for thediffPixelsrecord componentdiffRatio- the value for thediffRatiorecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
matched
-
diffImage
-
diffPixels
public long diffPixels()Returns the value of thediffPixelsrecord component.- Returns:
- the value of the
diffPixelsrecord component
-
diffRatio
-