E
- the type of Entry used in the indexD
- the type of Distance usedpublic class DistanceEntry<D extends Distance<D>,E extends Entry> extends Object implements Comparable<DistanceEntry<D,E>>
Modifier and Type | Field and Description |
---|---|
private D |
distance
The distance value belonging to the entry.
|
private E |
entry
The entry of the Index.
|
private int |
index
The index of the entry in its parent's child array.
|
Constructor and Description |
---|
DistanceEntry(E entry,
D distance,
int index)
Constructs a new DistanceEntry object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DistanceEntry<D,E> o)
Compares this object with the specified object for order.
|
D |
getDistance()
Returns the distance value belonging to the entry.
|
E |
getEntry()
Returns the entry of the Index.
|
int |
getIndex()
Returns the index of this entry in its parents child array.
|
String |
toString()
Returns a string representation of the object.
|
public E getEntry()
public D getDistance()
public int getIndex()
public int compareTo(DistanceEntry<D,E> o)
compareTo
in interface Comparable<DistanceEntry<D extends Distance<D>,E extends Entry>>
o
- the Object to be compared.ClassCastException
- if the specified object's type prevents it from
being compared to this Object.