Class ImmutableItemIdPartial

java.lang.Object
io.dialob.session.engine.session.model.ImmutableItemIdPartial
All Implemented Interfaces:
ItemId, ItemIdPartial, Serializable

@Generated(from="ItemIdPartial", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableItemIdPartial extends Object implements ItemIdPartial
Immutable implementation of ItemIdPartial.

Use the builder to create immutable instances: ImmutableItemIdPartial.builder(). Use the static factory method to create immutable instances: ImmutableItemIdPartial.of().

See Also:
  • Method Details

    • getParent

      public Optional<ItemId> getParent()
      Specified by:
      getParent in interface ItemId
      Returns:
      The value of the parent attribute
    • withParent

      public final ImmutableItemIdPartial withParent(ItemId value)
      Copy the current immutable object by setting a present value for the optional parent attribute.
      Specified by:
      withParent in interface ItemId
      Parameters:
      value - The value for parent
      Returns:
      A modified copy or this if not changed
    • withParent

      public final ImmutableItemIdPartial withParent(Optional<? extends ItemId> optional)
      Copy the current immutable object by setting an optional value for the parent attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Specified by:
      withParent in interface ItemId
      Parameters:
      optional - An optional value for parent
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableItemIdPartial 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: parent.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableItemIdPartial of(Optional<? extends ItemId> parent)
      Construct a new immutable ItemIdPartial instance.
      Parameters:
      parent - The value for the parent attribute
      Returns:
      An immutable ItemIdPartial instance
    • copyOf

      public static ImmutableItemIdPartial copyOf(ItemIdPartial instance)
      Creates an immutable copy of a ItemIdPartial 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 ItemIdPartial instance
    • builder

      public static ImmutableItemIdPartial.Builder builder()
      Creates a builder for ImmutableItemIdPartial.
       ImmutableItemIdPartial.builder()
          .parent(Optional<io.dialob.session.engine.session.model.ItemId>) // optional parent
          .build();
       
      Returns:
      A new ImmutableItemIdPartial builder