Class MemoizedSupplierImpl<T>

    • Field Detail

      • supplier

        protected java.util.function.Supplier<T> supplier
    • Constructor Detail

      • MemoizedSupplierImpl

        public MemoizedSupplierImpl​(java.util.function.Supplier<T> supplier)
    • Method Detail

      • of

        public static <T> MemoizedSupplier<T> of​(java.util.function.Supplier<T> supplier)
      • get

        public T get()
        Specified by:
        get in interface java.util.function.Supplier<T>
      • getCache

        public Map<Void,​T> getCache()
        Description copied from interface: Memoized
        Return a reference or copy to the memoized entries
        Specified by:
        getCache in interface Memoized<Void,​T>
      • clearCache

        public void clearCache()
        Description copied from interface: Memoized
        Clear the cache
        Specified by:
        clearCache in interface Memoized<Void,​T>