public static final class SMFAttribute.Builder extends Object
SMFAttribute.
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.
| Modifier and Type | Method and Description |
|---|---|
SMFAttribute |
build()
Builds a new
SMFAttribute. |
SMFAttribute.Builder |
from(SMFAttributeType instance)
Fill a builder with attribute values from the provided
SMFAttributeType instance. |
SMFAttribute.Builder |
setComponentCount(int componentCount)
Initializes the value for the
componentCount attribute. |
SMFAttribute.Builder |
setComponentSizeBits(int componentSizeBits)
Initializes the value for the
componentSizeBits attribute. |
SMFAttribute.Builder |
setComponentType(SMFComponentType componentType)
Initializes the value for the
componentType attribute. |
SMFAttribute.Builder |
setName(SMFAttributeName name)
Initializes the value for the
name attribute. |
public final SMFAttribute.Builder from(SMFAttributeType instance)
SMFAttributeType instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SMFAttribute.Builder setName(SMFAttributeName name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final SMFAttribute.Builder setComponentType(SMFComponentType componentType)
componentType attribute.componentType - The value for componentTypethis builder for use in a chained invocationpublic final SMFAttribute.Builder setComponentCount(int componentCount)
componentCount attribute.componentCount - The value for componentCountthis builder for use in a chained invocationpublic final SMFAttribute.Builder setComponentSizeBits(int componentSizeBits)
componentSizeBits attribute.componentSizeBits - The value for componentSizeBitsthis builder for use in a chained invocationpublic SMFAttribute build()
SMFAttribute.IllegalStateException - if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com