Package io.klib.swtbot.support
Record Class CaptureOptions
java.lang.Object
java.lang.Record
io.klib.swtbot.support.CaptureOptions
- Record Components:
outputDirectory- non-null root for isolated run/test directoriestimeout- positive completion budget of at least one millisecond; cannot stop executing native workmodes- nonempty, distinct capture modes, defensively copied in capture order
public record CaptureOptions(Path outputDirectory, Duration timeout, List<CaptureMode> modes)
extends Record
Immutable capture settings. Screen-based modes require explicit opt-in.
-
Constructor Summary
ConstructorsConstructorDescriptionCaptureOptions(Path outputDirectory, Duration timeout, List<CaptureMode> modes) Validates options and copies the mode list. -
Method Summary
Modifier and TypeMethodDescriptionstatic CaptureOptionsUses client-area capture only and a five-second completion budget.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modes()Returns the value of themodesrecord component.Returns the value of theoutputDirectoryrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CaptureOptions
Validates options and copies the mode list.- Parameters:
outputDirectory- screenshot output roottimeout- capture completion budgetmodes- ordered modes to capture- Throws:
NullPointerException- if an argument or mode is nullIllegalArgumentException- if timeout is below one millisecond or modes are empty or repeatedArithmeticException- if timeout cannot be represented in milliseconds
-
-
Method Details
-
defaults
Uses client-area capture only and a five-second completion budget.- Parameters:
outputDirectory- non-null screenshot output root- Returns:
- validated default options
- Throws:
NullPointerException- if the output directory is null
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
outputDirectory
Returns the value of theoutputDirectoryrecord component.- Returns:
- the value of the
outputDirectoryrecord component
-
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
modes
Returns the value of themodesrecord component.- Returns:
- the value of the
modesrecord component
-