|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.sciss.gui.StringItem
public class StringItem
A simple structure encompassing a string and an associated value. While the string is usually used as an internal, locale-independant lookup key, the object is usually something that gets presented to the user on the GUI.
PrefComboBox.addItem( Object )
,
AudioFileDescr.getFormatItems()
Field Summary | |
---|---|
static java.util.Comparator |
keyComparator
|
static java.util.Comparator |
valueComparator
|
Constructor Summary | |
---|---|
StringItem(java.lang.String key,
java.lang.Object value)
Constructs a new immutable StringItem. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Compares this object to another object |
java.lang.String |
getKey()
Queries the key. |
java.lang.Object |
getValue()
Queries the value object. |
int |
hashCode()
|
java.lang.String |
toString()
Returns a string representation of the value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator keyComparator
public static final java.util.Comparator valueComparator
Constructor Detail |
---|
public StringItem(java.lang.String key, java.lang.Object value)
key
- lookup keyvalue
- associated object, usually
human readableMethod Detail |
---|
public java.lang.String getKey()
public java.lang.Object getValue()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- an object which shall be compared to the StringItem
true
, if the provided object is a
StringItem whose key and value match this item's key and
value (using their respective equals
methods)public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
value.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |