|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object structure.Association structure.ComparableAssociation
public class ComparableAssociation
An association that can be compared.
Constructor Summary | |
---|---|
ComparableAssociation(Comparable key)
Construct an association that can be ordered, from only a key. |
|
ComparableAssociation(Comparable key,
Object value)
Construct a key-value association that can be ordered. |
Method Summary | |
---|---|
int |
compareTo(Object other)
Determine the order of two comparable associations, based on key. |
String |
toString()
Construct a string representation of the ComparableAssociation. |
Methods inherited from class structure.Association |
---|
equals, getKey, getValue, hashCode, setValue |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ComparableAssociation(Comparable key)
key
- The (comparable) key.public ComparableAssociation(Comparable key, Object value)
key
- The (comparable) key.value
- The (possibly comparable) associated value.Method Detail |
---|
public int compareTo(Object other)
compareTo
in interface Comparable
other
- The other comparable association.
public String toString()
toString
in class Association
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |