Class ImmutableItemStates.Builder
java.lang.Object
io.dialob.session.engine.session.model.ImmutableItemStates.Builder
- Enclosing class:
ImmutableItemStates
@Generated(from="ItemStates",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableItemStates.Builder
extends Object
Builds instances of type
ImmutableItemStates.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableItemStates.errorStates(Map<? extends ErrorId, ? extends ErrorState> entries) Sets or replaces all mappings from the specified map as entries for theerrorStatesmap.from(ItemStates instance) Fill a builder with attribute values from the providedItemStatesinstance.itemStates(Map<? extends ItemId, ? extends ItemState> entries) Sets or replaces all mappings from the specified map as entries for theitemStatesmap.putAllErrorStates(Map<? extends ErrorId, ? extends ErrorState> entries) Put all mappings from the specified map as entries toerrorStatesmap.putAllItemStates(Map<? extends ItemId, ? extends ItemState> entries) Put all mappings from the specified map as entries toitemStatesmap.putAllValueSetStates(Map<? extends ValueSetId, ? extends ValueSetState> entries) Put all mappings from the specified map as entries tovalueSetStatesmap.putErrorStates(ErrorId key, ErrorState value) Put one entry to theerrorStatesmap.putErrorStates(Map.Entry<? extends ErrorId, ? extends ErrorState> entry) Put one entry to theerrorStatesmap.putItemStates(ItemId key, ItemState value) Put one entry to theitemStatesmap.putItemStates(Map.Entry<? extends ItemId, ? extends ItemState> entry) Put one entry to theitemStatesmap.putValueSetStates(ValueSetId key, ValueSetState value) Put one entry to thevalueSetStatesmap.putValueSetStates(Map.Entry<? extends ValueSetId, ? extends ValueSetState> entry) Put one entry to thevalueSetStatesmap.valueSetStates(Map<? extends ValueSetId, ? extends ValueSetState> entries) Sets or replaces all mappings from the specified map as entries for thevalueSetStatesmap.
-
Method Details
-
from
Fill a builder with attribute values from the providedItemStatesinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putItemStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putItemStates(ItemId key, ItemState value) Put one entry to theitemStatesmap.- Parameters:
key- The key in the itemStates mapvalue- The associated value in the itemStates map- Returns:
thisbuilder for use in a chained invocation
-
putItemStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putItemStates(Map.Entry<? extends ItemId, ? extends ItemState> entry) Put one entry to theitemStatesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
itemStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder itemStates(Map<? extends ItemId, ? extends ItemState> entries) Sets or replaces all mappings from the specified map as entries for theitemStatesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the itemStates map- Returns:
thisbuilder for use in a chained invocation
-
putAllItemStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putAllItemStates(Map<? extends ItemId, ? extends ItemState> entries) Put all mappings from the specified map as entries toitemStatesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the itemStates map- Returns:
thisbuilder for use in a chained invocation
-
putValueSetStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putValueSetStates(ValueSetId key, ValueSetState value) Put one entry to thevalueSetStatesmap.- Parameters:
key- The key in the valueSetStates mapvalue- The associated value in the valueSetStates map- Returns:
thisbuilder for use in a chained invocation
-
putValueSetStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putValueSetStates(Map.Entry<? extends ValueSetId, ? extends ValueSetState> entry) Put one entry to thevalueSetStatesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
valueSetStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder valueSetStates(Map<? extends ValueSetId, ? extends ValueSetState> entries) Sets or replaces all mappings from the specified map as entries for thevalueSetStatesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the valueSetStates map- Returns:
thisbuilder for use in a chained invocation
-
putAllValueSetStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putAllValueSetStates(Map<? extends ValueSetId, ? extends ValueSetState> entries) Put all mappings from the specified map as entries tovalueSetStatesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the valueSetStates map- Returns:
thisbuilder for use in a chained invocation
-
putErrorStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putErrorStates(ErrorId key, ErrorState value) Put one entry to theerrorStatesmap.- Parameters:
key- The key in the errorStates mapvalue- The associated value in the errorStates map- Returns:
thisbuilder for use in a chained invocation
-
putErrorStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putErrorStates(Map.Entry<? extends ErrorId, ? extends ErrorState> entry) Put one entry to theerrorStatesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
errorStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder errorStates(Map<? extends ErrorId, ? extends ErrorState> entries) Sets or replaces all mappings from the specified map as entries for theerrorStatesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the errorStates map- Returns:
thisbuilder for use in a chained invocation
-
putAllErrorStates
@CanIgnoreReturnValue public final ImmutableItemStates.Builder putAllErrorStates(Map<? extends ErrorId, ? extends ErrorState> entries) Put all mappings from the specified map as entries toerrorStatesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the errorStates map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableItemStates.- Returns:
- An immutable instance of ItemStates
- Throws:
IllegalStateException- if any required attributes are missing
-