Class SingletonSupplier<O>

  • All Implemented Interfaces:
    Supplier<O>

    public class SingletonSupplier<O>
    extends Object
    implements Supplier<O>
    Get a Supplier with a cached value acting as a singleton.

    To remove cached value, use method clear().

    Created by tchemit on 28/09/17.

    Author:
    Tony Chemit - dev@tchemit.fr
    • Constructor Detail

      • SingletonSupplier

        protected SingletonSupplier​(Supplier<O> supplier,
                                    boolean requireNonNull)