|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.javax.util.BasicAssociation
This class implements Association
to represent a key-value pair.
Constructor Summary | |
BasicAssociation(java.lang.Object key)
Create an Association with the given key . |
|
BasicAssociation(java.lang.Object key,
java.lang.Object value)
Create an Association with the given key and value . |
Method Summary | |
java.lang.Object |
getKey()
Return the key. |
java.lang.Object |
getValue()
Return the value. |
int |
hashCode()
Return the key hashCode() if the key is not null, otherwise return super's hashCode(). |
void |
setKey(java.lang.Object key)
Set the key. |
void |
setValue(java.lang.Object value)
Set the value. |
java.lang.String |
toString()
Return a String representation of the receiver. |
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BasicAssociation(java.lang.Object key)
key
.
public BasicAssociation(java.lang.Object key, java.lang.Object value)
key
and value
.
Method Detail |
public void setKey(java.lang.Object key)
setKey
in interface Association
public java.lang.Object getKey()
getKey
in interface Association
public void setValue(java.lang.Object value)
setValue
in interface Association
public java.lang.Object getValue()
getValue
in interface Association
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
this.getKey() + " => " + this.getValue()
toString
in class java.lang.Object
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |