Package io.dialob.executor.model
Class ImmutableItemStates
- java.lang.Object
-
- io.dialob.executor.model.ImmutableItemStates
-
- All Implemented Interfaces:
ItemStates
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableItemStates extends Object implements ItemStates
Immutable implementation ofItemStates.Use the builder to create immutable instances:
ImmutableItemStates.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableItemStates.BuilderBuilds instances of typeImmutableItemStates.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableItemStates.Builderbuilder()Creates a builder forImmutableItemStates.static ImmutableItemStatescopyOf(ItemStates instance)Creates an immutable copy of aItemStatesvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableItemStatesthat have equal attribute values.com.google.common.collect.ImmutableMap<ErrorId,ErrorState>getErrorStates()com.google.common.collect.ImmutableMap<ItemId,ItemState>getItemStates()com.google.common.collect.ImmutableMap<ValueSetId,ValueSetState>getValueSetStates()inthashCode()Computes a hash code from attributes:itemStates,valueSetStates,errorStates.StringtoString()Prints the immutable valueItemStateswith attribute values.ImmutableItemStateswithErrorStates(Map<? extends ErrorId,? extends ErrorState> entries)Copy the current immutable object by replacing theerrorStatesmap with the specified map.ImmutableItemStateswithItemStates(Map<? extends ItemId,? extends ItemState> entries)Copy the current immutable object by replacing theitemStatesmap with the specified map.ImmutableItemStateswithValueSetStates(Map<? extends ValueSetId,? extends ValueSetState> entries)Copy the current immutable object by replacing thevalueSetStatesmap with the specified map.
-
-
-
Method Detail
-
getItemStates
public com.google.common.collect.ImmutableMap<ItemId,ItemState> getItemStates()
- Specified by:
getItemStatesin interfaceItemStates- Returns:
- The value of the
itemStatesattribute
-
getValueSetStates
public com.google.common.collect.ImmutableMap<ValueSetId,ValueSetState> getValueSetStates()
- Specified by:
getValueSetStatesin interfaceItemStates- Returns:
- The value of the
valueSetStatesattribute
-
getErrorStates
public com.google.common.collect.ImmutableMap<ErrorId,ErrorState> getErrorStates()
- Specified by:
getErrorStatesin interfaceItemStates- Returns:
- The value of the
errorStatesattribute
-
withItemStates
public final ImmutableItemStates withItemStates(Map<? extends ItemId,? extends ItemState> entries)
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 be added to the itemStates map- Returns:
- A modified copy of
thisobject
-
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 be added to the valueSetStates map- Returns:
- A modified copy of
thisobject
-
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 be added to the errorStates map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)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
public String toString()
Prints the immutable valueItemStateswith attribute values.
-
copyOf
public static ImmutableItemStates copyOf(ItemStates instance)
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
public static ImmutableItemStates.Builder builder()
Creates a builder forImmutableItemStates.ImmutableItemStates.builder() .putItemStates|putAllItemStates(io.dialob.executor.model.ItemId => io.dialob.executor.model.ItemState) //itemStatesmappings .putValueSetStates|putAllValueSetStates(io.dialob.executor.model.ValueSetId => io.dialob.executor.model.ValueSetState) //valueSetStatesmappings .putErrorStates|putAllErrorStates(io.dialob.executor.model.ErrorId => io.dialob.executor.model.ErrorState) //errorStatesmappings .build();- Returns:
- A new ImmutableItemStates builder
-
-