@NotThreadSafe public final class LengthConstraintBuilder extends Object
LengthConstraint.
Initialize attributes and then invoke the build() method to create an
immutable instance.
LengthConstraintBuilder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Constructor and Description |
|---|
LengthConstraintBuilder()
Creates a builder for
LengthConstraint instances. |
| Modifier and Type | Method and Description |
|---|---|
LengthConstraintBuilder |
allowedRanges(com.google.common.collect.RangeSet<Integer> allowedRanges)
Initializes the value for the
allowedRanges attribute. |
LengthConstraint |
build()
Builds a new
LengthConstraint. |
LengthConstraintBuilder |
description(Optional<String> description)
Initializes the optional value
description to description. |
LengthConstraintBuilder |
description(String description)
Initializes the optional value
description to description. |
LengthConstraintBuilder |
errorAppTag(Optional<String> errorAppTag)
Initializes the optional value
errorAppTag to errorAppTag. |
LengthConstraintBuilder |
errorAppTag(String errorAppTag)
Initializes the optional value
errorAppTag to errorAppTag. |
LengthConstraintBuilder |
errorMessage(Optional<String> errorMessage)
Initializes the optional value
errorMessage to errorMessage. |
LengthConstraintBuilder |
errorMessage(String errorMessage)
Initializes the optional value
errorMessage to errorMessage. |
LengthConstraintBuilder |
reference(Optional<String> reference)
Initializes the optional value
reference to reference. |
LengthConstraintBuilder |
reference(String reference)
Initializes the optional value
reference to reference. |
public LengthConstraintBuilder()
LengthConstraint instances.public final LengthConstraintBuilder allowedRanges(com.google.common.collect.RangeSet<Integer> allowedRanges)
allowedRanges attribute.allowedRanges - The value for allowedRangesthis builder for use in a chained invocationpublic final LengthConstraintBuilder errorAppTag(String errorAppTag)
errorAppTag to errorAppTag.errorAppTag - The value for errorAppTagthis builder for chained invocationpublic final LengthConstraintBuilder errorAppTag(Optional<String> errorAppTag)
errorAppTag to errorAppTag.errorAppTag - The value for errorAppTagthis builder for use in a chained invocationpublic final LengthConstraintBuilder errorMessage(String errorMessage)
errorMessage to errorMessage.errorMessage - The value for errorMessagethis builder for chained invocationpublic final LengthConstraintBuilder errorMessage(Optional<String> errorMessage)
errorMessage to errorMessage.errorMessage - The value for errorMessagethis builder for use in a chained invocationpublic final LengthConstraintBuilder description(String description)
description to description.description - The value for descriptionthis builder for chained invocationpublic final LengthConstraintBuilder description(Optional<String> description)
description to description.description - The value for descriptionthis builder for use in a chained invocationpublic final LengthConstraintBuilder reference(String reference)
reference to reference.reference - The value for referencethis builder for chained invocationpublic final LengthConstraintBuilder reference(Optional<String> reference)
reference to reference.reference - The value for referencethis builder for use in a chained invocationpublic LengthConstraint build()
LengthConstraint.IllegalStateException - if any required attributes are missingCopyright © 2019 OpenDaylight. All rights reserved.