|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.obsearch.AbstractOBResult<O> net.obsearch.result.OBResultInvertedFloat<O>
public final class OBResultInvertedFloat<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 float |
distance
Distance of the object found and the query. |
Fields inherited from class net.obsearch.AbstractOBResult |
---|
id, object |
Constructor Summary | |
---|---|
OBResultInvertedFloat()
Default constructor. |
|
OBResultInvertedFloat(O object,
long id,
float distance)
Create a new OBResultFloat. |
Method Summary | |
---|---|
int |
compareTo(Object o)
We implement the interface comparable so we provide this method. |
float |
getDistance()
|
void |
setDistance(float 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 float distance
Constructor Detail |
---|
public OBResultInvertedFloat()
public OBResultInvertedFloat(O object, long id, float 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 float getDistance()
public final void setDistance(float 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 |