Class ImmutableItemStates
java.lang.Object
io.dialob.session.engine.session.model.ImmutableItemStates
- All Implemented Interfaces:
ItemStates
@Generated(from="ItemStates",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableItemStates
extends Object
implements ItemStates
Immutable implementation of
ItemStates.
Use the builder to create immutable instances:
ImmutableItemStates.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableItemStates. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableItemStates.Builderbuilder()Creates a builder forImmutableItemStates.static ImmutableItemStatescopyOf(ItemStates instance) Creates an immutable copy of aItemStatesvalue.booleanThis instance is equal to all instances ofImmutableItemStatesthat have equal attribute values.com.google.common.collect.ImmutableMap<ErrorId, ErrorState> com.google.common.collect.ImmutableMap<ValueSetId, ValueSetState> inthashCode()Computes a hash code from attributes:itemStates,valueSetStates,errorStates.toString()Prints the immutable valueItemStateswith attribute values.final ImmutableItemStateswithErrorStates(Map<? extends ErrorId, ? extends ErrorState> entries) Copy the current immutable object by replacing theerrorStatesmap with the specified map.final ImmutableItemStateswithItemStates(Map<? extends ItemId, ? extends ItemState> entries) Copy the current immutable object by replacing theitemStatesmap with the specified map.final ImmutableItemStateswithValueSetStates(Map<? extends ValueSetId, ? extends ValueSetState> entries) Copy the current immutable object by replacing thevalueSetStatesmap with the specified map.
-
Method Details
-
getItemStates
- Specified by:
getItemStatesin interfaceItemStates- Returns:
- The value of the
itemStatesattribute
-
getValueSetStates
- Specified by:
getValueSetStatesin interfaceItemStates- Returns:
- The value of the
valueSetStatesattribute
-
getErrorStates
- Specified by:
getErrorStatesin interfaceItemStates- Returns:
- The value of the
errorStatesattribute
-
withItemStates
Copy the current immutable object by replacing theitemStatesmap 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 replace the itemStates map- Returns:
- A modified copy or
thisif not changed
-
withValueSetStates
public final ImmutableItemStates withValueSetStates(Map<? extends ValueSetId, ? extends ValueSetState> entries) Copy the current immutable object by replacing thevalueSetStatesmap 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 replace the valueSetStates map- Returns:
- A modified copy or
thisif not changed
-
withErrorStates
public final ImmutableItemStates withErrorStates(Map<? extends ErrorId, ? extends ErrorState> entries) Copy the current immutable object by replacing theerrorStatesmap 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 replace the errorStates map- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableItemStatesthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:itemStates,valueSetStates,errorStates. -
toString
Prints the immutable valueItemStateswith attribute values. -
copyOf
Creates an immutable copy of aItemStatesvalue. 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 ItemStates instance
-
builder
Creates a builder forImmutableItemStates.ImmutableItemStates.builder() .putItemStates|putAllItemStates(io.dialob.session.engine.session.model.ItemId => io.dialob.session.engine.session.model.ItemState) //itemStatesmappings .putValueSetStates|putAllValueSetStates(io.dialob.session.engine.session.model.ValueSetId => io.dialob.session.engine.session.model.ValueSetState) //valueSetStatesmappings .putErrorStates|putAllErrorStates(io.dialob.session.engine.session.model.ErrorId => io.dialob.session.engine.session.model.ErrorState) //errorStatesmappings .build();- Returns:
- A new ImmutableItemStates builder
-