Class ImmutableLabel.Builder
java.lang.Object
io.dialob.session.engine.program.model.ImmutableLabel.Builder
- Enclosing class:
ImmutableLabel
@Generated(from="Label",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableLabel.Builder
extends Object
Builds instances of type
ImmutableLabel.
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 TypeMethodDescriptionbuild()Builds a newImmutableLabel.final ImmutableLabel.BuilderFill a builder with attribute values from the providedLabelinstance.final ImmutableLabel.BuilderSets or replaces all mappings from the specified map as entries for thelabelsmap.final ImmutableLabel.BuilderputAllLabels(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tolabelsmap.final ImmutableLabel.BuilderPut one entry to thelabelsmap.final ImmutableLabel.BuilderPut one entry to thelabelsmap.
-
Method Details
-
from
Fill a builder with attribute values from the providedLabelinstance. 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
-
putLabels
Put one entry to thelabelsmap.- Parameters:
key- The key in the labels mapvalue- The associated value in the labels map- Returns:
thisbuilder for use in a chained invocation
-
putLabels
@CanIgnoreReturnValue public final ImmutableLabel.Builder putLabels(Map.Entry<String, ? extends String> entry) Put one entry to thelabelsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
labels
@CanIgnoreReturnValue public final ImmutableLabel.Builder labels(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thelabelsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the labels map- Returns:
thisbuilder for use in a chained invocation
-
putAllLabels
@CanIgnoreReturnValue public final ImmutableLabel.Builder putAllLabels(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tolabelsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the labels map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableLabel.- Returns:
- An immutable instance of Label
- Throws:
IllegalStateException- if any required attributes are missing
-