Package io.dialob.api.proto
Class ImmutableValueSet
java.lang.Object
io.dialob.api.proto.ImmutableValueSet
- All Implemented Interfaces:
ValueSet,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableValueSet
extends Object
implements ValueSet
Immutable implementation of
ValueSet.
Use the builder to create immutable instances:
ImmutableValueSet.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableValueSet.Builderbuilder()Creates a builder forImmutableValueSet.static ImmutableValueSetCreates an immutable copy of aValueSetvalue.booleanThis instance is equal to all instances ofImmutableValueSetthat have equal attribute values.getId()inthashCode()Computes a hash code from attributes:id,entries.toString()Prints the immutable valueValueSetwith attribute values.final ImmutableValueSetwithEntries(ValueSetEntry... elements) Copy the current immutable object with elements that replace the content ofentries.final ImmutableValueSetwithEntries(Iterable<? extends ValueSetEntry> elements) Copy the current immutable object with elements that replace the content ofentries.final ImmutableValueSetCopy the current immutable object by setting a value for theidattribute.
-
Method Details
-
getId
-
getEntries
- Specified by:
getEntriesin interfaceValueSet- Returns:
- The value of the
entriesattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withEntries
Copy the current immutable object with elements that replace the content ofentries.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEntries
Copy the current immutable object with elements that replace the content ofentries. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of entries elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableValueSetthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,entries. -
toString
Prints the immutable valueValueSetwith attribute values. -
copyOf
Creates an immutable copy of aValueSetvalue. 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 ValueSet instance
-
builder
Creates a builder forImmutableValueSet.ImmutableValueSet.builder() .id(String) // requiredid.addEntries|addAllEntries(io.dialob.api.proto.ValueSetEntry) //entrieselements .build();- Returns:
- A new ImmutableValueSet builder
-