Interface StatefulSupplier<T>

Type Parameters:
T - The type of results supplied by this supplier
All Superinterfaces:
Supplier<T>
All Known Subinterfaces:
SequenceSupplier<T>
All Known Implementing Classes:
Int4SequenceSupplier, Int8SequenceSupplier, RoundRobinValueSupplier, RowIndexToValueSupplier

public interface StatefulSupplier<T> extends Supplier<T>
In order to prevent state pollution when cloning Suppliers, this interface marks the Supplier as stateful.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static <T> StatefulSupplier<T>
    threadSafe(StatefulSupplier<T> sourceSupplier)
    Turns a thread-safe version of the given stateful supplier.

    Methods inherited from interface java.util.function.Supplier

    get
  • Method Details

    • threadSafe

      static <T> StatefulSupplier<T> threadSafe(StatefulSupplier<T> sourceSupplier)
      Turns a thread-safe version of the given stateful supplier.
      Type Parameters:
      T - The type of results supplied by this supplier
      Parameters:
      sourceSupplier - The source stateful supplier
      Returns:
      The thread-safe stateful supplier