Package com.io7m.waxmill.xml.vm.v1
Class WXM1OpenOptions
java.lang.Object
com.io7m.waxmill.xml.vm.v1.WXM1OpenOptions
- All Implemented Interfaces:
WXM1OpenOptionsType
public final class WXM1OpenOptions extends java.lang.Object implements WXM1OpenOptionsType
Immutable implementation of
WXM1OpenOptionsType.
Use the builder to create immutable instances:
WXM1OpenOptions.builder().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXM1OpenOptions.BuilderBuilds instances of typeWXM1OpenOptions. -
Method Summary
Modifier and Type Method Description static WXM1OpenOptions.Builderbuilder()Creates a builder forWXM1OpenOptions.static WXM1OpenOptionscopyOf(WXM1OpenOptionsType instance)Creates an immutable copy of aWXM1OpenOptionsTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXM1OpenOptionsthat have equal attribute values.inthashCode()Computes a hash code from attributes:openOptions.java.util.List<WXMOpenOption>openOptions()java.lang.StringtoString()Prints the immutable valueWXM1OpenOptionswith attribute values.WXM1OpenOptionswithOpenOptions(WXMOpenOption... elements)Copy the current immutable object with elements that replace the content ofopenOptions.WXM1OpenOptionswithOpenOptions(java.lang.Iterable<? extends WXMOpenOption> elements)Copy the current immutable object with elements that replace the content ofopenOptions.
-
Method Details
-
openOptions
- Specified by:
openOptionsin interfaceWXM1OpenOptionsType- Returns:
- The value of the
openOptionsattribute
-
withOpenOptions
Copy the current immutable object with elements that replace the content ofopenOptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOpenOptions
Copy the current immutable object with elements that replace the content ofopenOptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of openOptions elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXM1OpenOptionsthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:openOptions.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXM1OpenOptionswith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXM1OpenOptionsTypevalue. 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 WXM1OpenOptions instance
-
builder
Creates a builder forWXM1OpenOptions.WXM1OpenOptions.builder() .addOpenOptions|addAllOpenOptions(com.io7m.waxmill.machines.WXMOpenOption) //openOptionselements .build();- Returns:
- A new WXM1OpenOptions builder
-