Package com.io7m.waxmill.xml.config.v1
Class WXM1ZFSFilesystem
java.lang.Object
com.io7m.waxmill.xml.config.v1.WXM1ZFSFilesystem
- All Implemented Interfaces:
WXM1ZFSFilesystemType
public final class WXM1ZFSFilesystem extends java.lang.Object implements WXM1ZFSFilesystemType
Immutable implementation of
WXM1ZFSFilesystemType.
Use the builder to create immutable instances:
WXM1ZFSFilesystem.builder().
Use the static factory method to create immutable instances:
WXM1ZFSFilesystem.of().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXM1ZFSFilesystem.BuilderBuilds instances of typeWXM1ZFSFilesystem. -
Method Summary
Modifier and Type Method Description static WXM1ZFSFilesystem.Builderbuilder()Creates a builder forWXM1ZFSFilesystem.static WXM1ZFSFilesystemcopyOf(WXM1ZFSFilesystemType instance)Creates an immutable copy of aWXM1ZFSFilesystemTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXM1ZFSFilesystemthat have equal attribute values.WXMZFSFilesystemfilesystem()inthashCode()Computes a hash code from attributes:type,filesystem.static WXM1ZFSFilesystemof(java.lang.String type, WXMZFSFilesystem filesystem)Construct a new immutableWXM1ZFSFilesysteminstance.java.lang.StringtoString()Prints the immutable valueWXM1ZFSFilesystemwith attribute values.java.lang.Stringtype()WXM1ZFSFilesystemwithFilesystem(WXMZFSFilesystem value)Copy the current immutable object by setting a value for thefilesystemattribute.WXM1ZFSFilesystemwithType(java.lang.String value)Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
type
public java.lang.String type()- Specified by:
typein interfaceWXM1ZFSFilesystemType- Returns:
- The value of the
typeattribute
-
filesystem
- Specified by:
filesystemin interfaceWXM1ZFSFilesystemType- Returns:
- The value of the
filesystemattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withFilesystem
Copy the current immutable object by setting a value for thefilesystemattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for filesystem- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXM1ZFSFilesystemthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:type,filesystem.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXM1ZFSFilesystemwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableWXM1ZFSFilesysteminstance.- Parameters:
type- The value for thetypeattributefilesystem- The value for thefilesystemattribute- Returns:
- An immutable WXM1ZFSFilesystem instance
-
copyOf
Creates an immutable copy of aWXM1ZFSFilesystemTypevalue. 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 WXM1ZFSFilesystem instance
-
builder
Creates a builder forWXM1ZFSFilesystem.WXM1ZFSFilesystem.builder() .setType(String) // requiredtype.setFilesystem(com.io7m.waxmill.machines.WXMZFSFilesystem) // requiredfilesystem.build();- Returns:
- A new WXM1ZFSFilesystem builder
-