Package eu.bandm.tools.util.function
Interface Singleton<T>
- Type Parameters:
T- the type of the returned value
- All Superinterfaces:
Supplier<T>
- All Known Implementing Classes:
Lazy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface with an operation that always returns the same value.
If a function object that implements this interface is used sequentially,
the returned values must be identical according to
==. If computation of that value has observable side effects, they
should occur only on the first call.
Implementations of this interface are not required to be inherently
thread-safe. An object that is used concurrently by multiple
threads may return different values, even in the same thread. However, these
values must be equivalent according to Objects.equals(Object,Object).
The purpose of this interface is to give an abstract type for reified instances of the singleton design pattern.
- Since:
- 1.4
-
Method Summary