All methods return serializable suppliers as long as they're given serializable parameters.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | |
| private static class | |
| private static interface | |
| private static enum | |
| private static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <F extends @Nullable Object, T extends @Nullable Object> Supplier | |
| public static <T extends @Nullable Object> Supplier | |
| public static <T extends @Nullable Object> Supplier | memoizeWithExpiration(Supplier<T> delegate, long
the length of time after a value is created that it should stop being returned
by subsequent duration, TimeUnit get() callsthe unit that unit)duration is expressed inReturns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed. |
| public static <T extends @Nullable Object> Supplier | |
| public static <T extends @Nullable Object> Function | supplierFunction()
Returns a function that accepts a supplier and returns the result of invoking |
| public static <T extends @Nullable Object> Supplier | synchronizedSupplier(Supplier<T> delegate)
Returns a supplier whose |
| Suppliers | back to summary |
|---|---|
| private Suppliers() | |
| compose | back to summary |
|---|---|
| public static <F extends @Nullable Object, T extends @Nullable Object> Supplier Returns a new supplier which is the composition of the provided function and supplier. In other
words, the new supplier's value will be computed by retrieving the value from | |
| memoize | back to summary |
|---|---|
| public static <T extends @Nullable Object> Supplier Returns a supplier which caches the instance retrieved during the first call to The returned supplier is thread-safe. The delegate's When the underlying delegate throws an exception then this memoizing supplier will keep delegating calls until it returns valid data. If | |
| memoizeWithExpiration | back to summary |
|---|---|
| public static <T extends @Nullable Object> Supplier Returns a supplier that caches the instance supplied by the delegate and removes the cached
value after the specified time has passed. Subsequent calls to The returned supplier is thread-safe. The supplier's serialized form does not contain the
cached value, which will be recalculated when When the underlying delegate throws an exception then this memoizing supplier will keep delegating calls until it returns valid data.
| |
| ofInstance | back to summary |
|---|---|
| public static <T extends @Nullable Object> Supplier Returns a supplier that always supplies | |
| supplierFunction | back to summary |
|---|---|
| public static <T extends @Nullable Object> Function Returns a function that accepts a supplier and returns the result of invoking Java 8 users: use the method reference
| |
| synchronizedSupplier | back to summary |
|---|---|
| public static <T extends @Nullable Object> Supplier Returns a supplier whose | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Supplier | |
| pack-priv final long | |
| pack-priv transient volatile long | |
| private static final long | |
| pack-priv transient volatile T |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public String |
| delegate | back to summary |
|---|---|
| pack-priv final Supplier<T> delegate | |
| durationNanos | back to summary |
|---|---|
| pack-priv final long durationNanos | |
| expirationNanos | back to summary |
|---|---|
| pack-priv transient volatile long expirationNanos | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| value | back to summary |
|---|---|
| pack-priv transient volatile T value
| |
| ExpiringMemoizingSupplier | back to summary |
|---|---|
| pack-priv ExpiringMemoizingSupplier(Supplier<T> delegate, long duration, TimeUnit unit) | |
| get | back to summary |
|---|---|
| public T get() Implements com. Doc from com. Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Supplier | |
| pack-priv transient volatile boolean | |
| private static final long | |
| pack-priv transient T |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public String |
| delegate | back to summary |
|---|---|
| pack-priv final Supplier<T> delegate | |
| initialized | back to summary |
|---|---|
| pack-priv transient volatile boolean initialized | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| value | back to summary |
|---|---|
| pack-priv transient T value
| |
| MemoizingSupplier | back to summary |
|---|---|
| pack-priv MemoizingSupplier(Supplier<T> delegate) | |
| get | back to summary |
|---|---|
| public T get() Implements com. Doc from com. Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private volatile Supplier | |
| private static final Supplier | |
| private T |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public String |
| delegate | back to summary |
|---|---|
| private volatile Supplier<T> delegate | |
| SUCCESSFULLY_COMPUTED | back to summary |
|---|---|
private static final Supplier<Void> SUCCESSFULLY_COMPUTED
| |
| value | back to summary |
|---|---|
| private T value
| |
| NonSerializableMemoizingSupplier | back to summary |
|---|---|
| pack-priv NonSerializableMemoizingSupplier(Supplier<T> delegate) | |
| get | back to summary |
|---|---|
| public T get() Implements com. Doc from com. Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Function | |
| private static final long | |
| pack-priv final Supplier |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public T | |
| public int | |
| public String |
| function | back to summary |
|---|---|
| pack-priv final Function<? super F, T> function | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| supplier | back to summary |
|---|---|
| pack-priv final Supplier<F> supplier | |
| SupplierComposition | back to summary |
|---|---|
| pack-priv SupplierComposition(Function<? super F, T> function, Supplier<F> supplier) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| get | back to summary |
|---|---|
| public T get() Implements com. Doc from com. Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Suppliers. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Object | apply(Supplier<@Nullable Object>
the function argument input)Implements com. |
| public String | toString()
Overrides java. |
| public static Suppliers. | |
| public static Suppliers. |
| INSTANCE | back to summary |
|---|---|
| public static final Suppliers. | |
| SupplierFunctionImpl | back to summary |
|---|---|
| private SupplierFunctionImpl() | |
| apply | back to summary |
|---|---|
| public Object apply(Supplier<@Nullable Object> input) Implements com. Doc from java. Applies this function to the given argument. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static Suppliers. | |
| values | back to summary |
|---|---|
| public static Suppliers. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final T | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public T | |
| public int | |
| public String |
| instance | back to summary |
|---|---|
| pack-priv final T instance
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SupplierOfInstance | back to summary |
|---|---|
| pack-priv SupplierOfInstance(T instance) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| get | back to summary |
|---|---|
| public T get() Implements com. Doc from com. Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Supplier | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public String |
| delegate | back to summary |
|---|---|
| pack-priv final Supplier<T> delegate | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ThreadSafeSupplier | back to summary |
|---|---|
| pack-priv ThreadSafeSupplier(Supplier<T> delegate) | |
| get | back to summary |
|---|---|
| public T get() Implements com. Doc from com. Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |