Package com.io7m.waxmill.xml.vm.v1
Class WXM1PinCPUs
java.lang.Object
com.io7m.waxmill.xml.vm.v1.WXM1PinCPUs
- All Implemented Interfaces:
WXM1PinCPUsType
public final class WXM1PinCPUs extends java.lang.Object implements WXM1PinCPUsType
Immutable implementation of
WXM1PinCPUsType.
Use the builder to create immutable instances:
WXM1PinCPUs.builder().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXM1PinCPUs.BuilderBuilds instances of typeWXM1PinCPUs. -
Method Summary
Modifier and Type Method Description static WXM1PinCPUs.Builderbuilder()Creates a builder forWXM1PinCPUs.static WXM1PinCPUscopyOf(WXM1PinCPUsType instance)Creates an immutable copy of aWXM1PinCPUsTypevalue.java.util.List<WXMPinCPU>cpus()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXM1PinCPUsthat have equal attribute values.inthashCode()Computes a hash code from attributes:cpus.java.lang.StringtoString()Prints the immutable valueWXM1PinCPUswith attribute values.WXM1PinCPUswithCpus(WXMPinCPU... elements)Copy the current immutable object with elements that replace the content ofcpus.WXM1PinCPUswithCpus(java.lang.Iterable<? extends WXMPinCPU> elements)Copy the current immutable object with elements that replace the content ofcpus.
-
Method Details
-
cpus
- Specified by:
cpusin interfaceWXM1PinCPUsType- Returns:
- The value of the
cpusattribute
-
withCpus
Copy the current immutable object with elements that replace the content ofcpus.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCpus
Copy the current immutable object with elements that replace the content ofcpus. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of cpus elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXM1PinCPUsthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:cpus.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXM1PinCPUswith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXM1PinCPUsTypevalue. 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 WXM1PinCPUs instance
-
builder
Creates a builder forWXM1PinCPUs.WXM1PinCPUs.builder() .addCpus|addAllCpus(com.io7m.waxmill.machines.WXMPinCPU) //cpuselements .build();- Returns:
- A new WXM1PinCPUs builder
-