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 ofValueSet.Use the builder to create immutable instances:
ImmutableValueSet.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableValueSet.BuilderBuilds instances of typeImmutableValueSet.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableValueSet.Builderbuilder()Creates a builder forImmutableValueSet.static ImmutableValueSetcopyOf(ValueSet instance)Creates an immutable copy of aValueSetvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableValueSetthat have equal attribute values.List<ValueSetEntry>getEntries()StringgetId()inthashCode()Computes a hash code from attributes:id,entries.StringtoString()Prints the immutable valueValueSetwith attribute values.ImmutableValueSetwithEntries(ValueSetEntry... elements)Copy the current immutable object with elements that replace the content ofentries.ImmutableValueSetwithEntries(Iterable<? extends ValueSetEntry> elements)Copy the current immutable object with elements that replace the content ofentries.ImmutableValueSetwithId(String value)Copy the current immutable object by setting a value for theidattribute.
-
-
-
Method Detail
-
getId
public String getId()
-
getEntries
public List<ValueSetEntry> getEntries()
- Specified by:
getEntriesin interfaceValueSet- Returns:
- The value of the
entriesattribute
-
withId
public final ImmutableValueSet withId(String value)
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
public final ImmutableValueSet withEntries(ValueSetEntry... elements)
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
public final ImmutableValueSet withEntries(Iterable<? extends ValueSetEntry> elements)
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
public boolean equals(@Nullable Object another)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
public String toString()
Prints the immutable valueValueSetwith attribute values.
-
copyOf
public static ImmutableValueSet copyOf(ValueSet instance)
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
public static ImmutableValueSet.Builder builder()
Creates a builder forImmutableValueSet.ImmutableValueSet.builder() .id(String) // requiredid.addEntries|addAllEntries(io.dialob.api.proto.ValueSetEntry) //entrieselements .build();- Returns:
- A new ImmutableValueSet builder
-
-