Class Suppliers.NonSerializableMemoizingSupplier<T>

java.lang.Object
com.google.common.base.Suppliers.NonSerializableMemoizingSupplier<T>
All Implemented Interfaces:
Supplier<T>, Supplier<T>
Enclosing class:
Suppliers

static class Suppliers.NonSerializableMemoizingSupplier<T> extends Object implements Supplier<T>
  • Field Details

    • lock

      private final Object lock
    • SUCCESSFULLY_COMPUTED

      private static final Supplier<Void> SUCCESSFULLY_COMPUTED
    • delegate

      private volatile Supplier<T> delegate
    • value

      @CheckForNull private T value
  • Constructor Details

    • NonSerializableMemoizingSupplier

      NonSerializableMemoizingSupplier(Supplier<T> delegate)
  • Method Details

    • get

      public T get()
      Description copied from interface: Supplier
      Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
      Specified by:
      get in interface Supplier<T>
      Specified by:
      get in interface Supplier<T>
      Returns:
      an instance of the appropriate type
    • toString

      public String toString()
      Overrides:
      toString in class Object