Package com.google.common.base
Interface Supplier<T>
-
- All Superinterfaces:
<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@GwtCompatible public interface Supplier<T> extends <T>
Legacy version of . 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 ajava.util.function.Supplier
directly. To use ajava.util.function.Supplier
in a context where acom.google.common.base.Supplier
is needed, usesupplier::get
.See the Guava User Guide article on .
- Since:
- 2.0
- Author:
- Harry Heymann
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
get()
Retrieves an instance of the appropriate type.
-