Class WXMDeviceAHCIDisk

java.lang.Object
com.io7m.waxmill.machines.WXMDeviceAHCIDisk
All Implemented Interfaces:
WXMDeviceType, WXMDeviceType.WXMDeviceAHCIDiskType

public final class WXMDeviceAHCIDisk
extends java.lang.Object
implements WXMDeviceType.WXMDeviceAHCIDiskType
Immutable implementation of WXMDeviceType.WXMDeviceAHCIDiskType.

Use the builder to create immutable instances: WXMDeviceAHCIDisk.builder().

  • Method Details

    • deviceSlot

      public WXMDeviceSlot deviceSlot()
      Specified by:
      deviceSlot in interface WXMDeviceType
      Specified by:
      deviceSlot in interface WXMDeviceType.WXMDeviceAHCIDiskType
      Returns:
      The value of the deviceSlot attribute
    • comment

      public java.lang.String comment()
      Specified by:
      comment in interface WXMDeviceType
      Specified by:
      comment in interface WXMDeviceType.WXMDeviceAHCIDiskType
      Returns:
      The value of the comment attribute
    • backend

      Specified by:
      backend in interface WXMDeviceType.WXMDeviceAHCIDiskType
      Returns:
      The value of the backend attribute
    • withDeviceSlot

      public final WXMDeviceAHCIDisk withDeviceSlot​(WXMDeviceSlot value)
      Copy the current immutable object by setting a value for the deviceSlot attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for deviceSlot
      Returns:
      A modified copy of the this object
    • withComment

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

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

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of WXMDeviceAHCIDisk 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: deviceSlot, comment, backend.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

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

      public static WXMDeviceAHCIDisk copyOf​(WXMDeviceType.WXMDeviceAHCIDiskType instance)
      Creates an immutable copy of a WXMDeviceType.WXMDeviceAHCIDiskType 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 WXMDeviceAHCIDisk instance
    • builder

      public static WXMDeviceAHCIDisk.Builder builder()
      Creates a builder for WXMDeviceAHCIDisk.
       WXMDeviceAHCIDisk.builder()
          .setDeviceSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // required deviceSlot
          .setComment(String) // optional comment
          .setBackend(com.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendType) // required backend
          .build();
       
      Returns:
      A new WXMDeviceAHCIDisk builder