inf.util
Class IntKeyTreeMap.IntKeyTreeEntry<E>
java.lang.Object
inf.util.IntKeyTreeMap.IntKeyTreeEntry<E>
- All Implemented Interfaces:
- IntKeyMap.IntKeyEntry<E>, java.lang.Comparable<IntKeyMap.IntKeyEntry<E>>, java.util.Map.Entry<java.lang.Integer,E>
- Enclosing class:
- IntKeyTreeMap<E>
static class IntKeyTreeMap.IntKeyTreeEntry<E>
- extends java.lang.Object
- implements IntKeyMap.IntKeyEntry<E>, java.lang.Comparable<IntKeyMap.IntKeyEntry<E>>
Field Summary |
protected int |
key
|
protected E |
value
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
key
protected int key
value
protected E value
IntKeyTreeMap.IntKeyTreeEntry
public IntKeyTreeMap.IntKeyTreeEntry(int key,
E value,
IntKeyTreeMap.IntKeyTreeEntry<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 IntKeyEntry
in the tree
setValue
public E setValue(E newVal)
- Specified by:
setValue
in interface java.util.Map.Entry<java.lang.Integer,E>
getValue
public E getValue()
- Specified by:
getValue
in interface java.util.Map.Entry<java.lang.Integer,E>
getKey
public java.lang.Integer getKey()
- Specified by:
getKey
in interface java.util.Map.Entry<java.lang.Integer,E>
getIntKey
public int getIntKey()
- Description copied from interface:
IntKeyMap.IntKeyEntry
This function returns the the key of this key-value pair.
- Specified by:
getIntKey
in interface IntKeyMap.IntKeyEntry<E>
- Returns:
- the key of this IntKeyEntry as an int
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface java.util.Map.Entry<java.lang.Integer,E>
- Overrides:
equals
in class java.lang.Object
equals
public boolean equals(IntKeyTreeMap.IntKeyTreeEntry<E> e)
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.util.Map.Entry<java.lang.Integer,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(IntKeyMap.IntKeyEntry<E> ientry)
- Specified by:
compareTo
in interface java.lang.Comparable<IntKeyMap.IntKeyEntry<E>>