Package com.io7m.waxmill.machines
Class WXMStorageBackendZFSVolume.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMStorageBackendZFSVolume.Builder
- Enclosing class:
- WXMStorageBackendZFSVolume
public static final class WXMStorageBackendZFSVolume.Builder
extends java.lang.Object
Builds instances of type
WXMStorageBackendZFSVolume.
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 WXMStorageBackendZFSVolumebuild()Builds a newWXMStorageBackendZFSVolume.WXMStorageBackendZFSVolume.Builderfrom(WXMDeviceType.WXMStorageBackendType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendTypeinstance.WXMStorageBackendZFSVolume.Builderfrom(WXMDeviceType.WXMStorageBackendZFSVolumeType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendZFSVolumeTypeinstance.WXMStorageBackendZFSVolume.BuildersetComment(java.lang.String comment)Initializes the value for thecommentattribute.WXMStorageBackendZFSVolume.BuildersetExpectedSize(java.math.BigInteger expectedSize)Initializes the optional valueexpectedSizeto expectedSize.WXMStorageBackendZFSVolume.BuildersetExpectedSize(java.util.Optional<? extends java.math.BigInteger> expectedSize)Initializes the optional valueexpectedSizeto expectedSize.
-
Method Details
-
from
public final WXMStorageBackendZFSVolume.Builder from(WXMDeviceType.WXMStorageBackendZFSVolumeType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendZFSVolumeTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setComment
Initializes the value for thecommentattribute.If not set, this attribute will have a default value as returned by the initializer of
comment.- Parameters:
comment- The value for comment- Returns:
thisbuilder for use in a chained invocation
-
setExpectedSize
Initializes the optional valueexpectedSizeto expectedSize.- Parameters:
expectedSize- The value for expectedSize- Returns:
thisbuilder for chained invocation
-
setExpectedSize
public final WXMStorageBackendZFSVolume.Builder setExpectedSize(java.util.Optional<? extends java.math.BigInteger> expectedSize)Initializes the optional valueexpectedSizeto expectedSize.- Parameters:
expectedSize- The value for expectedSize- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMStorageBackendZFSVolume.- Returns:
- An immutable instance of WXMStorageBackendZFSVolume
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-