Package com.google.common.base
Interface Supplier<T>
- All Superinterfaces:
Supplier<T>
- All Known Subinterfaces:
ImmutableSupplier<T>
- All Known Implementing Classes:
AbstractIdleService.ThreadNameSupplier,HashBasedTable.Factory,Hashing.ChecksumType,Hashing.Crc32CSupplier,MultimapBuilder.ArrayListSupplier,MultimapBuilder.EnumSetSupplier,MultimapBuilder.HashSetSupplier,MultimapBuilder.LinkedHashSetSupplier,MultimapBuilder.LinkedListSupplier,MultimapBuilder.TreeSetSupplier,Suppliers.ExpiringMemoizingSupplier,Suppliers.MemoizingSupplier,Suppliers.NonSerializableMemoizingSupplier,Suppliers.SupplierComposition,Suppliers.SupplierOfInstance,Suppliers.ThreadSafeSupplier,TreeBasedTable.Factory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Legacy version of
java.util.function.Supplier. Semantically,
this could be a factory, generator, builder, closure, or something else entirely. No guarantees
are implied by this interface.
The Suppliers class provides common suppliers and related utilities.
As this interface extends java.util.function.Supplier, an instance of this type can be
used as a java.util.function.Supplier directly. To use a
java.util.function.Supplier in a context where a com.google.common.base.Supplier is
needed, use supplier::get.
See the Guava User Guide article on the use of Function.
- Since:
- 2.0
-
Method Summary