Package com.io7m.waxmill.machines
Class WXMSectorSizes
java.lang.Object
com.io7m.waxmill.machines.WXMSectorSizes
- All Implemented Interfaces:
WXMDeviceType.WXMSectorSizesType
public final class WXMSectorSizes extends java.lang.Object implements WXMDeviceType.WXMSectorSizesType
Immutable implementation of
WXMDeviceType.WXMSectorSizesType.
Use the builder to create immutable instances:
WXMSectorSizes.builder().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMSectorSizes.BuilderBuilds instances of typeWXMSectorSizes. -
Method Summary
Modifier and Type Method Description static WXMSectorSizes.Builderbuilder()Creates a builder forWXMSectorSizes.static WXMSectorSizescopyOf(WXMDeviceType.WXMSectorSizesType instance)Creates an immutable copy of aWXMDeviceType.WXMSectorSizesTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMSectorSizesthat have equal attribute values.inthashCode()Computes a hash code from attributes:logical,physical.java.math.BigIntegerlogical()java.math.BigIntegerphysical()java.lang.StringtoString()Prints the immutable valueWXMSectorSizeswith attribute values.WXMSectorSizeswithLogical(java.math.BigInteger value)Copy the current immutable object by setting a value for thelogicalattribute.WXMSectorSizeswithPhysical(java.math.BigInteger value)Copy the current immutable object by setting a value for thephysicalattribute.
-
Method Details
-
logical
public java.math.BigInteger logical()- Specified by:
logicalin interfaceWXMDeviceType.WXMSectorSizesType- Returns:
- The value of the
logicalattribute
-
physical
public java.math.BigInteger physical()- Specified by:
physicalin interfaceWXMDeviceType.WXMSectorSizesType- Returns:
- The value of the
physicalattribute
-
withLogical
Copy the current immutable object by setting a value for thelogicalattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for logical- Returns:
- A modified copy of the
thisobject
-
withPhysical
Copy the current immutable object by setting a value for thephysicalattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for physical- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMSectorSizesthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:logical,physical.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMSectorSizeswith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMSectorSizesTypevalue. 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 WXMSectorSizes instance
-
builder
Creates a builder forWXMSectorSizes.WXMSectorSizes.builder() .setLogical(java.math.BigInteger) // requiredlogical.setPhysical(java.math.BigInteger) // optionalphysical.build();- Returns:
- A new WXMSectorSizes builder
-