Package io.dialob.program.model
Class ImmutableLabel
- java.lang.Object
-
- io.dialob.program.model.ImmutableLabel
-
- All Implemented Interfaces:
Label,ProgramNode,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLabel extends Object implements Label
Immutable implementation ofLabel.Use the builder to create immutable instances:
ImmutableLabel.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLabel.BuilderBuilds instances of typeImmutableLabel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLabel.Builderbuilder()Creates a builder forImmutableLabel.static ImmutableLabelcopyOf(Label instance)Creates an immutable copy of aLabelvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLabelthat have equal attribute values.com.google.common.collect.ImmutableMap<String,String>getLabels()inthashCode()Computes a hash code from attributes:labels.StringtoString()Prints the immutable valueLabelwith attribute values.ImmutableLabelwithLabels(Map<String,? extends String> entries)Copy the current immutable object by replacing thelabelsmap with the specified map.
-
-
-
Method Detail
-
withLabels
public final ImmutableLabel withLabels(Map<String,? extends String> entries)
Copy the current immutable object by replacing thelabelsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the labels map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableLabelthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:labels.
-
toString
public String toString()
Prints the immutable valueLabelwith attribute values.
-
copyOf
public static ImmutableLabel copyOf(Label instance)
Creates an immutable copy of aLabelvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Label instance
-
builder
public static ImmutableLabel.Builder builder()
Creates a builder forImmutableLabel.ImmutableLabel.builder() .putLabels|putAllLabels(String => String) //labelsmappings .build();- Returns:
- A new ImmutableLabel builder
-
-