brutil
Class Entry
java.lang.Object
|
+--brutil.Entry
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable, brutil.aspects.ReferenceCountable
- public class Entry
- extends java.lang.Object
- implements java.lang.Comparable, java.lang.Cloneable, brutil.aspects.ReferenceCountable
|
Constructor Summary |
Entry()
|
Entry(java.lang.Object key,
java.lang.Object data)
|
|
Method Summary |
int |
compareTo(java.lang.Object other)
|
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
getKey()
Returns the key in this Entry. |
java.lang.Object |
getValue()
Returns the data value of this Entry. |
int |
hashCode()
Returns the hashcode of the key object. |
void |
reset(java.lang.Object key,
java.lang.Object data)
|
java.lang.Object |
setValue(java.lang.Object newData)
Changes the value to the given value, and returns the old
value. |
java.lang.String |
toString()
Returns a String representation of the key and value in
this Entry. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Entry
public Entry()
Entry
public Entry(java.lang.Object key,
java.lang.Object data)
reset
public void reset(java.lang.Object key,
java.lang.Object data)
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Returns the hashcode of the key object.
- Overrides:
hashCode in class java.lang.Object
getKey
public java.lang.Object getKey()
- Returns the key in this Entry.
- Returns:
- the key in this Entry.
getValue
public java.lang.Object getValue()
- Returns the data value of this Entry.
- Returns:
- the value in this Entry.
setValue
public java.lang.Object setValue(java.lang.Object newData)
- Changes the value to the given value, and returns the old
value.
- Parameters:
newData - The new value to set this Entry to contain.- Returns:
- the old value in this Entry.
compareTo
public int compareTo(java.lang.Object other)
- Specified by:
compareTo in interface java.lang.Comparable
toString
public java.lang.String toString()
- Returns a String representation of the key and value in
this Entry.
- Overrides:
toString in class java.lang.Object
- Returns:
- a String representation of the key and value in
this Entry.