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 class
WXM1HostDeviceSlot.Builder
Builds instances of typeWXM1HostDeviceSlot
. -
Method Summary
Modifier and Type Method Description static WXM1HostDeviceSlot.Builder
builder()
Creates a builder forWXM1HostDeviceSlot
.static WXM1HostDeviceSlot
copyOf(WXM1HostDeviceSlotType instance)
Creates an immutable copy of aWXM1HostDeviceSlotType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofWXM1HostDeviceSlot
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:slot
.static WXM1HostDeviceSlot
of(WXMDeviceSlot slot)
Construct a new immutableWXM1HostDeviceSlot
instance.WXMDeviceSlot
slot()
java.lang.String
toString()
Prints the immutable valueWXM1HostDeviceSlot
with attribute values.WXM1HostDeviceSlot
withSlot(WXMDeviceSlot value)
Copy the current immutable object by setting a value for theslot
attribute.
-
Method Details
-
slot
- Specified by:
slot
in interfaceWXM1HostDeviceSlotType
- Returns:
- The value of the
slot
attribute
-
withSlot
Copy the current immutable object by setting a value for theslot
attribute. 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
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXM1HostDeviceSlot
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:slot
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXM1HostDeviceSlot
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
Construct a new immutableWXM1HostDeviceSlot
instance.- Parameters:
slot
- The value for theslot
attribute- Returns:
- An immutable WXM1HostDeviceSlot instance
-
copyOf
Creates an immutable copy of aWXM1HostDeviceSlotType
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
Creates a builder forWXM1HostDeviceSlot
.WXM1HostDeviceSlot.builder() .setSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // required
slot
.build();- Returns:
- A new WXM1HostDeviceSlot builder
-