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 WXMSectorSizes
build()
Builds a newWXMSectorSizes
.WXMSectorSizes.Builder
from(WXMDeviceType.WXMSectorSizesType instance)
Fill a builder with attribute values from the providedWXMSectorSizesType
instance.WXMSectorSizes.Builder
setLogical(java.math.BigInteger logical)
Initializes the value for thelogical
attribute.WXMSectorSizes.Builder
setPhysical(java.math.BigInteger physical)
Initializes the value for thephysical
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedWXMSectorSizesType
instance. 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:
this
builder for use in a chained invocation
-
setLogical
Initializes the value for thelogical
attribute.- Parameters:
logical
- The value for logical- Returns:
this
builder for use in a chained invocation
-
setPhysical
Initializes the value for thephysical
attribute.If not set, this attribute will have a default value as returned by the initializer of
physical
.- Parameters:
physical
- The value for physical- Returns:
this
builder 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
-