Package com.io7m.waxmill.machines
Class WXMVirtualMachineSet
java.lang.Object
com.io7m.waxmill.machines.WXMVirtualMachineSet
- All Implemented Interfaces:
WXMVirtualMachineSetType
public final class WXMVirtualMachineSet extends java.lang.Object implements WXMVirtualMachineSetType
A set of virtual machines.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMVirtualMachineSet.BuilderBuilds instances of typeWXMVirtualMachineSet. -
Method Summary
Modifier and Type Method Description static WXMVirtualMachineSet.Builderbuilder()Creates a builder forWXMVirtualMachineSet.static WXMVirtualMachineSetcopyOf(WXMVirtualMachineSetType instance)Creates an immutable copy of aWXMVirtualMachineSetTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMVirtualMachineSetthat have equal attribute values.inthashCode()Computes a hash code from attributes:machines.java.util.SortedMap<java.util.UUID,WXMVirtualMachine>machines()java.lang.StringtoString()Prints the immutable valueWXMVirtualMachineSetwith attribute values.WXMVirtualMachineSetwithMachines(java.util.SortedMap<java.util.UUID,WXMVirtualMachine> value)Copy the current immutable object by setting a value for themachinesattribute.
-
Method Details
-
machines
- Specified by:
machinesin interfaceWXMVirtualMachineSetType- Returns:
- The virtual machines, by ID
-
withMachines
public final WXMVirtualMachineSet withMachines(java.util.SortedMap<java.util.UUID,WXMVirtualMachine> value)Copy the current immutable object by setting a value for themachinesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for machines- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMVirtualMachineSetthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:machines.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMVirtualMachineSetwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMVirtualMachineSetTypevalue. 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 WXMVirtualMachineSet instance
-
builder
Creates a builder forWXMVirtualMachineSet.WXMVirtualMachineSet.builder() .setMachines(SortedMap<UUID, WXMVirtualMachine>) // requiredmachines.build();- Returns:
- A new WXMVirtualMachineSet builder
-