|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.obsearch.AbstractOBResult<O>
net.obsearch.result.OBResultInvertedInt<O>
public final class OBResultInvertedInt<O>
This class is used to store a single match result. A single result consists of the object found, the distance of this object with the query and an internal id. Inverted results will put first smaller values in the priority queue.
| Field Summary | |
|---|---|
protected int |
distance
Distance of the object found and the query. |
| Fields inherited from class net.obsearch.AbstractOBResult |
|---|
id, object |
| Constructor Summary | |
|---|---|
OBResultInvertedInt()
Default constructor. |
|
OBResultInvertedInt(O object,
long id,
int distance)
Create a new OBResultInt. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
We implement the interface comparable so we provide this method. |
int |
getDistance()
|
void |
setDistance(int x)
Sets the distance to a new value x. |
String |
toString()
Return a human readable representation of the object. |
| Methods inherited from class net.obsearch.AbstractOBResult |
|---|
getId, getObject, setId, setObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int distance
| Constructor Detail |
|---|
public OBResultInvertedInt()
public OBResultInvertedInt(O object,
long id,
int distance)
object - the result found.id - The internal id of the result.distance - Distance of the result and the original query.| Method Detail |
|---|
public final int getDistance()
public final void setDistance(int x)
x - The new value to set.public int compareTo(Object o)
o - The object that will be compared.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||