Class Suppliers.WeakMemoizingSupplier<A>

  • All Implemented Interfaces:
    java.util.function.Supplier<A>
    Enclosing class:
    Suppliers

    private static final class Suppliers.WeakMemoizingSupplier<A>
    extends java.lang.Object
    implements java.util.function.Supplier<A>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Supplier<A> delegate  
      private java.lang.ref.WeakReference<A> value  
    • Constructor Summary

      Constructors 
      Constructor Description
      WeakMemoizingSupplier​(java.util.function.Supplier<A> delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      A get()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • delegate

        private final java.util.function.Supplier<A> delegate
      • value

        private volatile java.lang.ref.WeakReference<A> value
    • Constructor Detail

      • WeakMemoizingSupplier

        WeakMemoizingSupplier​(java.util.function.Supplier<A> delegate)
    • Method Detail

      • get

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