Class CachingComposingSupplier<T,U>

Type Parameters:
T - the type of objects this supplier produces.
U - the type of objects this supplier bases its products on.
All Implemented Interfaces:

public class CachingComposingSupplier<T,U> extends Object implements Supplier<T>
A supplier of objects that relies on another supplier and caches provided results.
  • Constructor Details

    • CachingComposingSupplier

      public CachingComposingSupplier(Supplier<U> inputProvider, Function<U,T> producer)
      inputProvider - the provider that gives inputs for each product of this provider.
      producer - the function that returns products of this provider given inputs.
  • Method Details

    • get

      public T get()
      Specified by:
      get in interface Supplier<T>