- Type Parameters:
T - the type of objects that may be supplied by this supplier.
- All Implemented Interfaces:
Supplier<T>
public final class DelegatingSupplier<T>
extends Object
implements Supplier<T>
A supplier which delegates to other supplier if it is configured.
- Author:
- Richard Opalka
-
Constructor Summary
Constructors
-
Method Summary
Gets delegating supplier value or null if supplier is not configured.
void
Sets supplier to delegate to.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DelegatingSupplier
public DelegatingSupplier()
-
Method Details
-
get
Gets delegating supplier value or null if supplier is not configured.
- Specified by:
get in interface Supplier<T>
- Returns:
- delegating supplier value
-
set
Sets supplier to delegate to.
- Parameters:
delegate - supplier to delegate to