Class WXM1HostDeviceSlot

java.lang.Object
com.io7m.waxmill.xml.vm.v1.WXM1HostDeviceSlot
All Implemented Interfaces:
WXM1HostDeviceSlotType

public final class WXM1HostDeviceSlot
extends java.lang.Object
implements WXM1HostDeviceSlotType
Immutable implementation of WXM1HostDeviceSlotType.

Use the builder to create immutable instances: WXM1HostDeviceSlot.builder(). Use the static factory method to create immutable instances: WXM1HostDeviceSlot.of().

  • Method Details

    • slot

      public WXMDeviceSlot slot()
      Specified by:
      slot in interface WXM1HostDeviceSlotType
      Returns:
      The value of the slot attribute
    • withSlot

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

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

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

      public static WXM1HostDeviceSlot of​(WXMDeviceSlot slot)
      Construct a new immutable WXM1HostDeviceSlot instance.
      Parameters:
      slot - The value for the slot attribute
      Returns:
      An immutable WXM1HostDeviceSlot instance
    • copyOf

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

      public static WXM1HostDeviceSlot.Builder builder()
      Creates a builder for WXM1HostDeviceSlot.
       WXM1HostDeviceSlot.builder()
          .setSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // required slot
          .build();
       
      Returns:
      A new WXM1HostDeviceSlot builder