Package com.io7m.jwheatsheaf.api
Class JWFileListingFailed
- java.lang.Object
-
- com.io7m.jwheatsheaf.api.JWFileListingFailed
-
- All Implemented Interfaces:
JWFileChooserEventType,JWFileChooserEventType.JWFileChooserEventErrorType,JWFileChooserEventType.JWFileListingFailedType
public final class JWFileListingFailed extends java.lang.Object implements JWFileChooserEventType.JWFileListingFailedType
An error occurred whilst trying to list a directory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJWFileListingFailed.BuilderBuilds instances of typeJWFileListingFailed.-
Nested classes/interfaces inherited from interface com.io7m.jwheatsheaf.api.JWFileChooserEventType
JWFileChooserEventType.JWDirectoryCreationFailedType, JWFileChooserEventType.JWFileChooserEventErrorType, JWFileChooserEventType.JWFileListingFailedType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JWFileListingFailed.Builderbuilder()Creates a builder forJWFileListingFailed.static JWFileListingFailedcopyOf(JWFileChooserEventType.JWFileListingFailedType instance)Creates an immutable copy of aJWFileChooserEventType.JWFileListingFailedTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofJWFileListingFailedthat have equal attribute values.java.lang.Exceptionexception()inthashCode()Computes a hash code from attributes:path,exception.static JWFileListingFailedof(java.nio.file.Path path, java.lang.Exception exception)Construct a new immutableJWFileListingFailedinstance.java.nio.file.Pathpath()java.lang.StringtoString()Prints the immutable valueJWFileListingFailedwith attribute values.JWFileListingFailedwithException(java.lang.Exception value)Copy the current immutable object by setting a value for theexceptionattribute.JWFileListingFailedwithPath(java.nio.file.Path value)Copy the current immutable object by setting a value for thepathattribute.
-
-
-
Method Detail
-
path
public java.nio.file.Path path()
- Specified by:
pathin interfaceJWFileChooserEventType.JWFileChooserEventErrorType- Specified by:
pathin interfaceJWFileChooserEventType.JWFileListingFailedType- Returns:
- The directory that could not be listed
-
exception
public java.lang.Exception exception()
- Specified by:
exceptionin interfaceJWFileChooserEventType.JWFileChooserEventErrorType- Specified by:
exceptionin interfaceJWFileChooserEventType.JWFileListingFailedType- Returns:
- The exception
-
withPath
public final JWFileListingFailed withPath(java.nio.file.Path value)
Copy the current immutable object by setting a value for thepathattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for path- Returns:
- A modified copy of the
thisobject
-
withException
public final JWFileListingFailed withException(java.lang.Exception value)
Copy the current immutable object by setting a value for theexceptionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for exception- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofJWFileListingFailedthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:path,exception.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueJWFileListingFailedwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static JWFileListingFailed of(java.nio.file.Path path, java.lang.Exception exception)
Construct a new immutableJWFileListingFailedinstance.- Parameters:
path- The value for thepathattributeexception- The value for theexceptionattribute- Returns:
- An immutable JWFileListingFailed instance
-
copyOf
public static JWFileListingFailed copyOf(JWFileChooserEventType.JWFileListingFailedType instance)
Creates an immutable copy of aJWFileChooserEventType.JWFileListingFailedTypevalue. 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 JWFileListingFailed instance
-
builder
public static JWFileListingFailed.Builder builder()
Creates a builder forJWFileListingFailed.JWFileListingFailed.builder() .setPath(java.nio.file.Path) // requiredpath.setException(Exception) // requiredexception.build();- Returns:
- A new JWFileListingFailed builder
-
-