Package com.io7m.waxmill.xml.config.v1
Class WXM1ZFSFilesystems.Builder
java.lang.Object
com.io7m.waxmill.xml.config.v1.WXM1ZFSFilesystems.Builder
- Enclosing class:
- WXM1ZFSFilesystems
public static final class WXM1ZFSFilesystems.Builder
extends java.lang.Object
Builds instances of type
WXM1ZFSFilesystems.
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 WXM1ZFSFilesystems.BuilderaddAllFilesystems(java.lang.Iterable<? extends WXM1ZFSFilesystem> elements)Adds elements tofilesystemslist.WXM1ZFSFilesystems.BuilderaddFilesystems(WXM1ZFSFilesystem element)Adds one element tofilesystemslist.WXM1ZFSFilesystems.BuilderaddFilesystems(WXM1ZFSFilesystem... elements)Adds elements tofilesystemslist.WXM1ZFSFilesystemsbuild()Builds a newWXM1ZFSFilesystems.WXM1ZFSFilesystems.Builderfrom(WXM1ZFSFilesystemsType instance)Fill a builder with attribute values from the providedWXM1ZFSFilesystemsTypeinstance.WXM1ZFSFilesystems.BuildersetFilesystems(java.lang.Iterable<? extends WXM1ZFSFilesystem> elements)Sets or replaces all elements forfilesystemslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedWXM1ZFSFilesystemsTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addFilesystems
Adds one element tofilesystemslist.- Parameters:
element- A filesystems element- Returns:
thisbuilder for use in a chained invocation
-
addFilesystems
Adds elements tofilesystemslist.- Parameters:
elements- An array of filesystems elements- Returns:
thisbuilder for use in a chained invocation
-
setFilesystems
public final WXM1ZFSFilesystems.Builder setFilesystems(java.lang.Iterable<? extends WXM1ZFSFilesystem> elements)Sets or replaces all elements forfilesystemslist.- Parameters:
elements- An iterable of filesystems elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFilesystems
public final WXM1ZFSFilesystems.Builder addAllFilesystems(java.lang.Iterable<? extends WXM1ZFSFilesystem> elements)Adds elements tofilesystemslist.- Parameters:
elements- An iterable of filesystems elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXM1ZFSFilesystems.- Returns:
- An immutable instance of WXM1ZFSFilesystems
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-