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