|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ashridgetech.jamda.uml.Holder
Utility class to hold an Object
which may not be initialised until required.
It may be set with a null value, but this can be distinguished from an 'unset' state.
The set(java.lang.Object)
method must be called before the get()
method, and set(java.lang.Object)
may only be called once.
Constructor Summary | |
Holder()
|
Method Summary | |
java.lang.Object |
get()
Gets the value of this Holder |
boolean |
isSet()
Shows whether the value of this Holder has been set |
void |
set(java.lang.Object value)
Sets the value of this Holder |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Holder()
Method Detail |
public java.lang.Object get()
Holder
java.lang.IllegalStateException
- if set(java.lang.Object)
has not been called yetpublic void set(java.lang.Object value)
Holder
value
- the value to store
java.lang.IllegalStateException
- if set(java.lang.Object)
has already been calledpublic boolean isSet()
Holder
has been set
set(java.lang.Object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |