inf.util
Class DoubleKeyTreeMap.DoubleKeyTreeEntry<E>
java.lang.Object
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
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
key
protected double key
value
protected E value
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 mappingvalue
- the value to which the key is to be mappedparent
- the parent DoubleKeyEntry
in the tree
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>>