net.sf.beanlib.utils.range
Class ExtensibleTreeMap.NodeEntry<K,V>

java.lang.Object
  extended by net.sf.beanlib.utils.range.ExtensibleTreeMap.NodeEntry<K,V>
All Implemented Interfaces:
Map.Entry<K,V>
Enclosing class:
ExtensibleTreeMap<K,V>

static class ExtensibleTreeMap.NodeEntry<K,V>
extends Object
implements Map.Entry<K,V>

Node in the Tree. Doubles as a means to pass key-value pairs back to user (see Map.Entry).


Field Summary
(package private)  boolean color
           
(package private)  K key
           
(package private)  ExtensibleTreeMap.NodeEntry<K,V> left
           
(package private)  ExtensibleTreeMap.NodeEntry<K,V> parent
           
(package private)  ExtensibleTreeMap.NodeEntry<K,V> right
           
(package private)  V value
           
 
Constructor Summary
ExtensibleTreeMap.NodeEntry(K key, V value, ExtensibleTreeMap.NodeEntry<K,V> parent)
          Make a new cell with given key, value, and parent, and with null child links, and BLACK color.
 
Method Summary
 boolean equals(Object o)
           
 K getKey()
          Returns the key.
 V getValue()
          Returns the value associated with the key.
 int hashCode()
           
 V setValue(V value)
          Replaces the value currently associated with the key with the given value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

key

K key

value

V value

left

ExtensibleTreeMap.NodeEntry<K,V> left

right

ExtensibleTreeMap.NodeEntry<K,V> right

parent

ExtensibleTreeMap.NodeEntry<K,V> parent

color

boolean color
Constructor Detail

ExtensibleTreeMap.NodeEntry

ExtensibleTreeMap.NodeEntry(K key,
                            V value,
                            ExtensibleTreeMap.NodeEntry<K,V> parent)
Make a new cell with given key, value, and parent, and with null child links, and BLACK color.

Method Detail

getKey

public K getKey()
Returns the key.

Specified by:
getKey in interface Map.Entry<K,V>
Returns:
the key.

getValue

public V getValue()
Returns the value associated with the key.

Specified by:
getValue in interface Map.Entry<K,V>
Returns:
the value associated with the key.

setValue

public V setValue(V value)
Replaces the value currently associated with the key with the given value.

Specified by:
setValue in interface Map.Entry<K,V>
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<K,V>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map.Entry<K,V>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object