public static final class SMFSchemaAttribute.Builder extends Object
SMFSchemaAttribute.
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 |
|---|---|
SMFSchemaAttribute |
build()
Builds a new
SMFSchemaAttribute. |
SMFSchemaAttribute.Builder |
from(SMFSchemaAttributeType instance)
Fill a builder with attribute values from the provided
SMFSchemaAttributeType instance. |
SMFSchemaAttribute.Builder |
setName(SMFAttributeName name)
Initializes the value for the
name attribute. |
SMFSchemaAttribute.Builder |
setRequiredComponentCount(int requiredComponentCount)
Initializes the optional value
requiredComponentCount to requiredComponentCount. |
SMFSchemaAttribute.Builder |
setRequiredComponentCount(OptionalInt requiredComponentCount)
Initializes the optional value
requiredComponentCount to requiredComponentCount. |
SMFSchemaAttribute.Builder |
setRequiredComponentSize(int requiredComponentSize)
Initializes the optional value
requiredComponentSize to requiredComponentSize. |
SMFSchemaAttribute.Builder |
setRequiredComponentSize(OptionalInt requiredComponentSize)
Initializes the optional value
requiredComponentSize to requiredComponentSize. |
SMFSchemaAttribute.Builder |
setRequiredComponentType(Optional<? extends SMFComponentType> requiredComponentType)
Initializes the optional value
requiredComponentType to requiredComponentType. |
SMFSchemaAttribute.Builder |
setRequiredComponentType(SMFComponentType requiredComponentType)
Initializes the optional value
requiredComponentType to requiredComponentType. |
public final SMFSchemaAttribute.Builder from(SMFSchemaAttributeType instance)
SMFSchemaAttributeType 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 SMFSchemaAttribute.Builder setName(SMFAttributeName name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final SMFSchemaAttribute.Builder setRequiredComponentType(SMFComponentType requiredComponentType)
requiredComponentType to requiredComponentType.requiredComponentType - The value for requiredComponentTypethis builder for chained invocationpublic final SMFSchemaAttribute.Builder setRequiredComponentType(Optional<? extends SMFComponentType> requiredComponentType)
requiredComponentType to requiredComponentType.requiredComponentType - The value for requiredComponentTypethis builder for use in a chained invocationpublic final SMFSchemaAttribute.Builder setRequiredComponentCount(int requiredComponentCount)
requiredComponentCount to requiredComponentCount.requiredComponentCount - The value for requiredComponentCountthis builder for chained invocationpublic final SMFSchemaAttribute.Builder setRequiredComponentCount(OptionalInt requiredComponentCount)
requiredComponentCount to requiredComponentCount.requiredComponentCount - The value for requiredComponentCountthis builder for use in a chained invocationpublic final SMFSchemaAttribute.Builder setRequiredComponentSize(int requiredComponentSize)
requiredComponentSize to requiredComponentSize.requiredComponentSize - The value for requiredComponentSizethis builder for chained invocationpublic final SMFSchemaAttribute.Builder setRequiredComponentSize(OptionalInt requiredComponentSize)
requiredComponentSize to requiredComponentSize.requiredComponentSize - The value for requiredComponentSizethis builder for use in a chained invocationpublic SMFSchemaAttribute build()
SMFSchemaAttribute.IllegalStateException - if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com