|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbcds.tools.PQItemWithNumericKey<E>
public class PQItemWithNumericKey<E>
An item that can be inserted into a priority queue, where the priority is defined by a numeric key. The key is internally stored as a double.
| Constructor Summary | |
|---|---|
PQItemWithNumericKey(E elem,
double key)
Creates saving the reference to elem and copying
the key. |
|
| Method Summary | |
|---|---|
int |
compareTo(PQItemWithNumericKey<E> b)
Compares the keys of this item with that of the instance b. |
E |
getData()
Returns the reference to the data element stored in this object. |
double |
getKey()
Returns the key of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PQItemWithNumericKey(E elem,
double key)
elem and copying
the key.
| Method Detail |
|---|
public int compareTo(PQItemWithNumericKey<E> b)
b.
compareTo in interface java.lang.Comparable<PQItemWithNumericKey<E>>public E getData()
public double getKey()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||