|
||||||||||
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.OBResultInvertedByte<O>
public final class OBResultInvertedByte<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 byte |
distance
Distance of the object found and the query. |
Fields inherited from class net.obsearch.AbstractOBResult |
---|
id, object |
Constructor Summary | |
---|---|
OBResultInvertedByte()
Default constructor. |
|
OBResultInvertedByte(O object,
long id,
byte distance)
Create a new OBResultByte. |
Method Summary | |
---|---|
int |
compareTo(Object o)
We implement the interface comparable so we provide this method. |
byte |
getDistance()
|
void |
setDistance(byte 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 byte distance
Constructor Detail |
---|
public OBResultInvertedByte()
public OBResultInvertedByte(O object, long id, byte 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 byte getDistance()
public final void setDistance(byte 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 |