|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.schmant.lang.TwoState<T>
public class TwoState<T>
The TwoState contains a value that is either set or not set. If set,
the value is an object or null.
| Constructor Summary | |
|---|---|
TwoState()
Create a new, unset TwoState. |
|
TwoState(TwoState<T> obj)
Create a new TwoState object with the same state as another. |
|
| Method Summary | |
|---|---|
T |
get()
Get the value. |
boolean |
isSet()
Is a value set on this object. |
void |
set(T val)
Set the value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TwoState()
TwoState.
public TwoState(TwoState<T> obj)
TwoState object with the same state as another.
obj - The other TwoState object.| Method Detail |
|---|
public void set(T val)
val - The value.public boolean isSet()
true if a value is set.
public T get()
throws IllegalStateException
IllegalStateException - If a value is not set.public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||