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().

  • Method Details

    • getItemStates

      public com.google.common.collect.ImmutableMap<ItemId,ItemState> getItemStates()
      Specified by:
      getItemStates in interface ItemStates
      Returns:
      The value of the itemStates attribute
    • getValueSetStates

      public com.google.common.collect.ImmutableMap<ValueSetId,ValueSetState> getValueSetStates()
      Specified by:
      getValueSetStates in interface ItemStates
      Returns:
      The value of the valueSetStates attribute
    • getErrorStates

      public com.google.common.collect.ImmutableMap<ErrorId,ErrorState> getErrorStates()
      Specified by:
      getErrorStates in interface ItemStates
      Returns:
      The value of the errorStates attribute
    • withItemStates

      public final ImmutableItemStates withItemStates(Map<? extends ItemId,? extends ItemState> entries)
      Copy the current immutable object by replacing the itemStates map 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 returning this.
      Parameters:
      entries - The entries to replace the itemStates map
      Returns:
      A modified copy or this if not changed
    • withValueSetStates

      public final ImmutableItemStates withValueSetStates(Map<? extends ValueSetId,? extends ValueSetState> entries)
      Copy the current immutable object by replacing the valueSetStates map 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 returning this.
      Parameters:
      entries - The entries to replace the valueSetStates map
      Returns:
      A modified copy or this if not changed
    • withErrorStates

      public final ImmutableItemStates withErrorStates(Map<? extends ErrorId,? extends ErrorState> entries)
      Copy the current immutable object by replacing the errorStates map 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 returning this.
      Parameters:
      entries - The entries to replace the errorStates map
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableItemStates that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: itemStates, valueSetStates, errorStates.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ItemStates with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableItemStates copyOf(ItemStates instance)
      Creates an immutable copy of a ItemStates value. 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 for ImmutableItemStates.
       ImmutableItemStates.builder()
          .putItemStates|putAllItemStates(io.dialob.session.engine.session.model.ItemId => io.dialob.session.engine.session.model.ItemState) // itemStates mappings
          .putValueSetStates|putAllValueSetStates(io.dialob.session.engine.session.model.ValueSetId => io.dialob.session.engine.session.model.ValueSetState) // valueSetStates mappings
          .putErrorStates|putAllErrorStates(io.dialob.session.engine.session.model.ErrorId => io.dialob.session.engine.session.model.ErrorState) // errorStates mappings
          .build();
       
      Returns:
      A new ImmutableItemStates builder