Package com.io7m.waxmill.xml.vm.v1
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().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXM1HostDeviceSlot.BuilderBuilds instances of typeWXM1HostDeviceSlot. -
Method Summary
Modifier and Type Method Description static WXM1HostDeviceSlot.Builderbuilder()Creates a builder forWXM1HostDeviceSlot.static WXM1HostDeviceSlotcopyOf(WXM1HostDeviceSlotType instance)Creates an immutable copy of aWXM1HostDeviceSlotTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXM1HostDeviceSlotthat have equal attribute values.inthashCode()Computes a hash code from attributes:slot.static WXM1HostDeviceSlotof(WXMDeviceSlot slot)Construct a new immutableWXM1HostDeviceSlotinstance.WXMDeviceSlotslot()java.lang.StringtoString()Prints the immutable valueWXM1HostDeviceSlotwith attribute values.WXM1HostDeviceSlotwithSlot(WXMDeviceSlot value)Copy the current immutable object by setting a value for theslotattribute.
-
Method Details
-
slot
- Specified by:
slotin interfaceWXM1HostDeviceSlotType- Returns:
- The value of the
slotattribute
-
withSlot
Copy the current immutable object by setting a value for theslotattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for slot- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXM1HostDeviceSlotthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:slot.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXM1HostDeviceSlotwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableWXM1HostDeviceSlotinstance.- Parameters:
slot- The value for theslotattribute- Returns:
- An immutable WXM1HostDeviceSlot instance
-
copyOf
Creates an immutable copy of aWXM1HostDeviceSlotTypevalue. 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
Creates a builder forWXM1HostDeviceSlot.WXM1HostDeviceSlot.builder() .setSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // requiredslot.build();- Returns:
- A new WXM1HostDeviceSlot builder
-