|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--voji.utils.ValueHolder
This class holds a value under a certain name.
It seems to be the name Object,
but it also contains the value Object.
It's useful for Lists, ComboBoxes and Tables
when you want the user to see "Eleven" but want
to work with the result 11.
This could be also a replacement for voji.utils.choice,
if it would work :-(
| Field Summary | |
java.lang.Object |
name
The name Object |
java.lang.Object |
value
The value Object |
| Constructor Summary | |
ValueHolder()
Creates a new ValueHolder instance with null fields |
|
ValueHolder(java.lang.Object initValue)
Creates a "dummy" ValueHolder instance with a null name
for comparations |
|
ValueHolder(java.lang.Object initName,
java.lang.Object initValue)
Creates a new ValueHolder instance |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one |
static java.lang.Object |
get(java.lang.Object valueHolder)
A shorter way to access the value of a ValueHolder |
java.lang.String |
toString()
Formats this Object as a String. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public java.lang.Object name
public java.lang.Object value
| Constructor Detail |
public ValueHolder(java.lang.Object initName,
java.lang.Object initValue)
initName - the initial nameinitValue - the initial valuepublic ValueHolder(java.lang.Object initValue)
null name
for comparations
initValue - the initial valuepublic ValueHolder()
null fields
| Method Detail |
public java.lang.String toString()
name :-)
toString in class java.lang.Objectnamepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic static java.lang.Object get(java.lang.Object valueHolder)
valueHolder - the ValueHolder whose value is wanted
((ValueHolder)valueHolder).value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||