Class SingleGlobalState<T>
- java.lang.Object
-
- com.g2forge.alexandria.java.nestedstate.SingleGlobalState<T>
-
- All Implemented Interfaces:
IFunctional
,IRunnable
,ISupplier<T>
,IThrowRunnable<RuntimeException>
,ICloseableNestedState<T>
,INestedState<T>
,Runnable
,Supplier<T>
public class SingleGlobalState<T> extends Object implements ICloseableNestedState<T>
-
-
Constructor Summary
Constructors Constructor Description SingleGlobalState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close(T expected)
T
get()
ICloseable
open(T value)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.g2forge.alexandria.java.function.ISupplier
run, toFunction, wrap
-
-
-
-
Field Detail
-
valid
protected boolean valid
-
value
protected T value
-
-
Method Detail
-
close
public void close(T expected)
- Specified by:
close
in interfaceICloseableNestedState<T>
-
open
public ICloseable open(T value)
- Specified by:
open
in interfaceINestedState<T>
-
-