Package com.io7m.waxmill.machines
Class WXMZFSFilesystem
java.lang.Object
com.io7m.waxmill.machines.WXMZFSFilesystem
- All Implemented Interfaces:
WXMZFSFilesystemType
public final class WXMZFSFilesystem extends java.lang.Object implements WXMZFSFilesystemType
A ZFS filesystem.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMZFSFilesystem.BuilderBuilds instances of typeWXMZFSFilesystem. -
Method Summary
Modifier and Type Method Description static WXMZFSFilesystem.Builderbuilder()Creates a builder forWXMZFSFilesystem.static WXMZFSFilesystemcopyOf(WXMZFSFilesystemType instance)Creates an immutable copy of aWXMZFSFilesystemTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMZFSFilesystemthat have equal attribute values.inthashCode()Computes a hash code from attributes:name,mountPoint.java.nio.file.PathmountPoint()The path at which the filesystem is mounted.java.lang.Stringname()The name of the filesystem.java.lang.StringtoString()Prints the immutable valueWXMZFSFilesystemwith attribute values.WXMZFSFilesystemwithMountPoint(java.nio.file.Path value)Copy the current immutable object by setting a value for themountPointattribute.WXMZFSFilesystemwithName(java.lang.String value)Copy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
name
public java.lang.String name()The name of the filesystem. This is the name that would be, for example, passed tozfs create -V name/of/fs.- Specified by:
namein interfaceWXMZFSFilesystemType- Returns:
- The name of the filesystem
-
mountPoint
public java.nio.file.Path mountPoint()The path at which the filesystem is mounted.- Specified by:
mountPointin interfaceWXMZFSFilesystemType- Returns:
- The filesystem mount point
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withMountPoint
Copy the current immutable object by setting a value for themountPointattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mountPoint- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMZFSFilesystemthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:name,mountPoint.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMZFSFilesystemwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMZFSFilesystemTypevalue. 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 WXMZFSFilesystem instance
-
builder
Creates a builder forWXMZFSFilesystem.WXMZFSFilesystem.builder() .setName(String) // requiredname.setMountPoint(java.nio.file.Path) // requiredmountPoint.build();- Returns:
- A new WXMZFSFilesystem builder
-