- All Superinterfaces:
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@GwtCompatible @FunctionalInterface public interface Supplier<T extends @Nullable Object> extends Supplier<T>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.
Suppliersclass 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.Supplierdirectly. To use a
java.util.function.Supplierin a context where a
com.google.common.base.Supplieris needed, use
See the Guava User Guide article on the use of
- Harry Heymann