Class ItemWithContext<T>

java.lang.Object
io.smallrye.mutiny.ItemWithContext<T>
Type Parameters:
T - the item type

public final class ItemWithContext<T> extends Object
Models an item flowing along a Mutiny pipeline with its subscriber context attached.
See Also:
  • Constructor Details

    • ItemWithContext

      public ItemWithContext(Context context, T item)
      Creates a new item with a context.

      Since instances are being created by Mutiny operators there is no null check on parameters for performance reasons.

      Parameters:
      context - the context
      item - the item
  • Method Details

    • context

      public Context context()
      Gives the context.
      Returns:
      the context
    • get

      public T get()
      Gives the item.
      Returns:
      the item
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object