gate.util
Class RBTreeMap.Entry
java.lang.Object
|
+--gate.util.RBTreeMap.Entry
- All Implemented Interfaces:
- Map.Entry
- Enclosing class:
- RBTreeMap
- static class RBTreeMap.Entry
- extends Object
- implements Map.Entry
Node in the Tree. Doubles as a means to pass key-value pairs back to
user (see Map.Entry).
key
Object key
value
Object value
left
RBTreeMap.Entry left
right
RBTreeMap.Entry right
parent
RBTreeMap.Entry parent
color
boolean color
RBTreeMap.Entry
RBTreeMap.Entry(Object key,
Object value,
RBTreeMap.Entry parent)
- Make a new cell with given key, value, and parent, and with
null child links, and BLACK color.
getKey
public Object getKey()
- Returns the key.
- Specified by:
getKey
in interface Map.Entry
- Returns:
- the key.
getValue
public Object getValue()
- Returns the value associated with the key.
- Specified by:
getValue
in interface Map.Entry
- Returns:
- the value associated with the key.
setValue
public Object setValue(Object value)
- Replaces the value currently associated with the key with the given
value.
- Specified by:
setValue
in interface Map.Entry
- Returns:
- the value associated with the key before this method was
called.
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Map.Entry
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Map.Entry
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object