inf.util
Class DoubleKeyTreeMap.DoubleKeyTreeEntry<E>

java.lang.Object
  extended by inf.util.DoubleKeyTreeMap.DoubleKeyTreeEntry<E>
All Implemented Interfaces:
DoubleKeyMap.DoubleKeyEntry<E>, java.lang.Comparable<DoubleKeyMap.DoubleKeyEntry<E>>, java.util.Map.Entry<java.lang.Double,E>
Enclosing class:
DoubleKeyTreeMap<E>

static class DoubleKeyTreeMap.DoubleKeyTreeEntry<E>
extends java.lang.Object
implements DoubleKeyMap.DoubleKeyEntry<E>, java.lang.Comparable<DoubleKeyMap.DoubleKeyEntry<E>>


Field Summary
protected  double key
           
protected  E value
           
 
Constructor Summary
DoubleKeyTreeMap.DoubleKeyTreeEntry(double key, E value, DoubleKeyTreeMap.DoubleKeyTreeEntry<E> parent)
           Make a new cell with given key, value, and parent, and with null child links, and BLACK colour.
 
Method Summary
 int compareTo(DoubleKeyMap.DoubleKeyEntry<E> ientry)
           
 boolean equals(DoubleKeyTreeMap.DoubleKeyTreeEntry<E> e)
           
 boolean equals(java.lang.Object o)
           
 double getDoubleKey()
           This function returns the the key of this key-value pair.
 java.lang.Double getKey()
           
 E getValue()
           
 int hashCode()
           
 E setValue(E newVal)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected double key

value

protected E value
Constructor Detail

DoubleKeyTreeMap.DoubleKeyTreeEntry

public DoubleKeyTreeMap.DoubleKeyTreeEntry(double key,
                                           E value,
                                           DoubleKeyTreeMap.DoubleKeyTreeEntry<E> parent)

Make a new cell with given key, value, and parent, and with null child links, and BLACK colour.

Parameters:
key - the key of the mapping
value - the value to which the key is to be mapped
parent - the parent DoubleKeyEntry in the tree
Method Detail

setValue

public E setValue(E newVal)
Specified by:
setValue in interface java.util.Map.Entry<java.lang.Double,E>

getValue

public E getValue()
Specified by:
getValue in interface java.util.Map.Entry<java.lang.Double,E>

getKey

public java.lang.Double getKey()
Specified by:
getKey in interface java.util.Map.Entry<java.lang.Double,E>

getDoubleKey

public double getDoubleKey()
Description copied from interface: DoubleKeyMap.DoubleKeyEntry

This function returns the the key of this key-value pair.

Specified by:
getDoubleKey in interface DoubleKeyMap.DoubleKeyEntry<E>
Returns:
the key of this DoubleKeyEntry as a double

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Map.Entry<java.lang.Double,E>
Overrides:
equals in class java.lang.Object

equals

public boolean equals(DoubleKeyTreeMap.DoubleKeyTreeEntry<E> e)

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map.Entry<java.lang.Double,E>
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(DoubleKeyMap.DoubleKeyEntry<E> ientry)
Specified by:
compareTo in interface java.lang.Comparable<DoubleKeyMap.DoubleKeyEntry<E>>