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().

  • Method Details

    • type

      public java.lang.String type()
      Specified by:
      type in interface WXM1ZFSFilesystemType
      Returns:
      The value of the type attribute
    • filesystem

      public WXMZFSFilesystem filesystem()
      Specified by:
      filesystem in interface WXM1ZFSFilesystemType
      Returns:
      The value of the filesystem attribute
    • withType

      public final WXM1ZFSFilesystem withType​(java.lang.String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy of the this object
    • withFilesystem

      public final WXM1ZFSFilesystem withFilesystem​(WXMZFSFilesystem value)
      Copy the current immutable object by setting a value for the filesystem attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for filesystem
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of WXM1ZFSFilesystem that have equal attribute values.
      Overrides:
      equals in class java.lang.Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: type, filesystem.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

      public java.lang.String toString()
      Prints the immutable value WXM1ZFSFilesystem with attribute values.
      Overrides:
      toString in class java.lang.Object
      Returns:
      A string representation of the value
    • of

      public static WXM1ZFSFilesystem of​(java.lang.String type, WXMZFSFilesystem filesystem)
      Construct a new immutable WXM1ZFSFilesystem instance.
      Parameters:
      type - The value for the type attribute
      filesystem - The value for the filesystem attribute
      Returns:
      An immutable WXM1ZFSFilesystem instance
    • copyOf

      public static WXM1ZFSFilesystem copyOf​(WXM1ZFSFilesystemType instance)
      Creates an immutable copy of a WXM1ZFSFilesystemType value. 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

      public static WXM1ZFSFilesystem.Builder builder()
      Creates a builder for WXM1ZFSFilesystem.
       WXM1ZFSFilesystem.builder()
          .setType(String) // required type
          .setFilesystem(com.io7m.waxmill.machines.WXMZFSFilesystem) // required filesystem
          .build();
       
      Returns:
      A new WXM1ZFSFilesystem builder