com.aliasi.util
Interface Scored

All Known Subinterfaces:
Chunk
All Known Implementing Classes:
ChunkAndCharSeq, Dendrogram, DictionaryEntry, LeafDendrogram, LinkDendrogram, ScoredObject, ScoredTagging

public interface Scored

The Scored interface should be implemented by objects that return a double-valued score. There is a simple score comparator, and scored objects are the natural wrappers of other objects in priority queues.

Since:
LingPipe2.0
Version:
3.0
Author:
Bob Carpenter

Field Summary
static Comparator<Scored> REVERSE_SCORE_COMPARATOR
          Deprecated. Use the static factory method ScoredObject.reverseComparator() instead.
static Comparator<Scored> SCORE_COMPARATOR
          Deprecated. Use the static factory method ScoredObject.comparator() instead.
 
Method Summary
 double score()
          Returns the score for this object.
 

Field Detail

SCORE_COMPARATOR

@Deprecated
static final Comparator<Scored> SCORE_COMPARATOR
Deprecated. Use the static factory method ScoredObject.comparator() instead.
A comparator that compares scored objects by their score. Note that this comparator may not be consistent with natural equality on a scored object which may depend on factors in addition to the score. This comparator may be used as the priority ordering for a priority queue of objects sorted by score. It may also be passed to Arrays.sort(Object[],Comparator).


REVERSE_SCORE_COMPARATOR

@Deprecated
static final Comparator<Scored> REVERSE_SCORE_COMPARATOR
Deprecated. Use the static factory method ScoredObject.reverseComparator() instead.
A comparator that orders scored objects in reverse score order. Thus it returns the negative value of that returned by SCORE_COMPARATOR, and like that ordering, is not consistent with object equality. This comparator is useful for priority queues.

Method Detail

score

double score()
Returns the score for this object.

Returns:
The score for this object.