inf.util
Class IntKeyTreeMap.IntKeyTreeEntry<E>

java.lang.Object
  extended by 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
           
 
Constructor Summary
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.
 
Method Summary
 int compareTo(IntKeyMap.IntKeyEntry<E> ientry)
           
 boolean equals(IntKeyTreeMap.IntKeyTreeEntry<E> e)
           
 boolean equals(java.lang.Object o)
           
 int getIntKey()
           This function returns the the key of this key-value pair.
 java.lang.Integer 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 int key

value

protected E value
Constructor Detail

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 mapping
value - the value to which the key is to be mapped
parent - the parent IntKeyEntry in the tree
Method Detail

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>>