Class CachingSupplier<T>

  • Type Parameters:
    T - the type of results supplied by this supplier
    All Implemented Interfaces:
    Supplier<T>

    public class CachingSupplier<T>
    extends Object
    implements Supplier<T>
    Supplier that caches the value.

    This is not threadsafe.

    • Constructor Detail

      • CachingSupplier

        public CachingSupplier​(Supplier<T> supplier)
    • Method Detail

      • get

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