Package com.io7m.waxmill.machines
Class WXMSectorSizes.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMSectorSizes.Builder
- Enclosing class:
- WXMSectorSizes
public static final class WXMSectorSizes.Builder
extends java.lang.Object
Builds instances of type
WXMSectorSizes.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and Type Method Description WXMSectorSizesbuild()Builds a newWXMSectorSizes.WXMSectorSizes.Builderfrom(WXMDeviceType.WXMSectorSizesType instance)Fill a builder with attribute values from the providedWXMSectorSizesTypeinstance.WXMSectorSizes.BuildersetLogical(java.math.BigInteger logical)Initializes the value for thelogicalattribute.WXMSectorSizes.BuildersetPhysical(java.math.BigInteger physical)Initializes the value for thephysicalattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedWXMSectorSizesTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setLogical
Initializes the value for thelogicalattribute.- Parameters:
logical- The value for logical- Returns:
thisbuilder for use in a chained invocation
-
setPhysical
Initializes the value for thephysicalattribute.If not set, this attribute will have a default value as returned by the initializer of
physical.- Parameters:
physical- The value for physical- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMSectorSizes.- Returns:
- An immutable instance of WXMSectorSizes
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-