|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.util.ScoredObject<E>
public class ScoredObject<E>
A ScoredObject provides an implementation of the
Scored interface with an attached object. Scored
objects are immutable and identity is reference. The object
returned by the getter getObject() is the actual object
stored, so changes to it will affect the scored object of which it
is a part.
| Field Summary |
|---|
| Fields inherited from interface com.aliasi.util.Scored |
|---|
REVERSE_SCORE_COMPARATOR, SCORE_COMPARATOR |
| Constructor Summary | |
|---|---|
ScoredObject(E obj,
double score)
Construct a scored object from the specified object and score. |
|
| Method Summary | |
|---|---|
E |
getObject()
Returns the object attached to this scored object. |
double |
score()
Returns the score for this scored object. |
String |
toString()
Returns a string-based representation of this object consisting of the score followed by a colon ( ':'), followed
by the object converted to a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScoredObject(E obj,
double score)
obj - Object for the constructed scored object.score - Score for the constructed scored object.| Method Detail |
|---|
public E getObject()
public double score()
score in interface Scoredpublic String toString()
':'), followed
by the object converted to a string.
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||