Package com.io7m.jwheatsheaf.ui.internal
Class JWFileChoosersTesting
java.lang.Object
com.io7m.jwheatsheaf.ui.internal.JWFileChoosersTesting
- All Implemented Interfaces:
JWFileChoosersTestingType
public final class JWFileChoosersTesting extends java.lang.Object implements JWFileChoosersTestingType
Configuration parameters useful for testing this chooser implementation.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJWFileChoosersTesting.BuilderBuilds instances of typeJWFileChoosersTesting. -
Method Summary
Modifier and Type Method Description static JWFileChoosersTesting.Builderbuilder()Creates a builder forJWFileChoosersTesting.static JWFileChoosersTestingcopyOf(JWFileChoosersTestingType instance)Creates an immutable copy of aJWFileChoosersTestingTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofJWFileChoosersTestingthat have equal attribute values.inthashCode()Computes a hash code from attributes:ioDelay.java.util.Optional<java.time.Duration>ioDelay()java.lang.StringtoString()Prints the immutable valueJWFileChoosersTestingwith attribute values.JWFileChoosersTestingwithIoDelay(java.time.Duration value)Copy the current immutable object by setting a present value for the optionalioDelayattribute.JWFileChoosersTestingwithIoDelay(java.util.Optional<? extends java.time.Duration> optional)Copy the current immutable object by setting an optional value for theioDelayattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Method Details
-
ioDelay
public java.util.Optional<java.time.Duration> ioDelay()- Specified by:
ioDelayin interfaceJWFileChoosersTestingType- Returns:
- A delay added to I/O operations to test how the UI responds to slow I/O.
-
withIoDelay
Copy the current immutable object by setting a present value for the optionalioDelayattribute.- Parameters:
value- The value for ioDelay- Returns:
- A modified copy of
thisobject
-
withIoDelay
public final JWFileChoosersTesting withIoDelay(java.util.Optional<? extends java.time.Duration> optional)Copy the current immutable object by setting an optional value for theioDelayattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for ioDelay- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofJWFileChoosersTestingthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:ioDelay.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueJWFileChoosersTestingwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aJWFileChoosersTestingTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable JWFileChoosersTesting instance
-
builder
Creates a builder forJWFileChoosersTesting.JWFileChoosersTesting.builder() .setIoDelay(java.time.Duration) // optionalioDelay.build();- Returns:
- A new JWFileChoosersTesting builder
-