Class WXM1LinuxInitRDDevice

java.lang.Object
com.io7m.waxmill.xml.vm.v1.WXM1LinuxInitRDDevice
All Implemented Interfaces:
WXM1LinuxInitRDDeviceType

public final class WXM1LinuxInitRDDevice
extends java.lang.Object
implements WXM1LinuxInitRDDeviceType
Immutable implementation of WXM1LinuxInitRDDeviceType.

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

  • Method Details

    • deviceSlot

      public WXMDeviceSlot deviceSlot()
      Specified by:
      deviceSlot in interface WXM1LinuxInitRDDeviceType
      Returns:
      The value of the deviceSlot attribute
    • initRDPath

      public java.nio.file.Path initRDPath()
      Specified by:
      initRDPath in interface WXM1LinuxInitRDDeviceType
      Returns:
      The value of the initRDPath attribute
    • withDeviceSlot

      public final WXM1LinuxInitRDDevice 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
    • withInitRDPath

      public final WXM1LinuxInitRDDevice withInitRDPath​(java.nio.file.Path value)
      Copy the current immutable object by setting a value for the initRDPath attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for initRDPath
      Returns:
      A modified copy of the this object
    • equals

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

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

      public static WXM1LinuxInitRDDevice copyOf​(WXM1LinuxInitRDDeviceType instance)
      Creates an immutable copy of a WXM1LinuxInitRDDeviceType 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 WXM1LinuxInitRDDevice instance
    • builder

      public static WXM1LinuxInitRDDevice.Builder builder()
      Creates a builder for WXM1LinuxInitRDDevice.
       WXM1LinuxInitRDDevice.builder()
          .setDeviceSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // required deviceSlot
          .setInitRDPath(java.nio.file.Path) // required initRDPath
          .build();
       
      Returns:
      A new WXM1LinuxInitRDDevice builder