Class AffinityWithFX.SetOnce<T>
java.lang.Object
etithespirit.orimod.api.environment.defaultimpl.AffinityWithFX.SetOnce<T>
- Type Parameters:
T
- The type of data stored.
- Enclosing class:
- AffinityWithFX
A single use storage class.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SetOnce
public SetOnce()
-
-
Method Details
-
set
Set the value stored within.- Parameters:
value
- The value to store.- Throws:
IllegalStateException
- If a value has already been stored.
-
get
Acquire the value stored within.- Returns:
- The value stored within.
- Throws:
NullPointerException
- If the value has not been set.
-
has
public boolean has()Signifies whether or not the value has been set.- Returns:
- True if the value has been set, false if it has not.
-