|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiitb.con.ds.Node<K>
public class Node<K extends java.lang.Comparable<K>>
Node is a key-value pair. It is a generic structure to hold different data type which implements the Comparable interface to facilitate the comparison of keys.
Field Summary | |
---|---|
K |
key
Generic key data type |
int |
value
value for the key |
Constructor Summary | |
---|---|
Node()
|
|
Node(K key,
int value)
|
Method Summary | |
---|---|
int |
compareTo(Node<K> node)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public K extends java.lang.Comparable<K> key
public int value
Constructor Detail |
---|
public Node()
public Node(K key, int value)
Method Detail |
---|
public int compareTo(Node<K> node)
compareTo
in interface java.lang.Comparable<Node<K extends java.lang.Comparable<K>>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |