|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<DocumentMatch>
com.fxpal.search.RankedList
public class RankedList
Ranked list of DocumentMatch instances corresponding to search results. Extends ArrayList with some utility methods.
| Constructor Summary | |
|---|---|
RankedList()
Default constructor. |
|
RankedList(int capacity)
Constructor that specifies an initial size. |
|
RankedList(java.util.List<DocumentMatch> matches)
Creates a new instance with the given elements |
|
| Method Summary | |
|---|---|
static RankedList |
fromDocIds(java.lang.Iterable<java.lang.String> ids)
Creates a new instance of a RankedList that contains one entry for each id in the given list; entries have the same score and are all marked as relevant. |
static RankedList |
fromDocIds(java.lang.String[] ids)
Creates a new instance of a RankedList that contains one entry for each id in the given list; entries have the same score and are all marked as relevant. |
void |
normalizeScores(int max,
int min)
Normalizes the scores to the range [max, min]. |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public RankedList(java.util.List<DocumentMatch> matches)
matches - List of DOcumentMatch instancespublic RankedList()
public RankedList(int capacity)
capacity - Initial capacity of the list| Method Detail |
|---|
public static RankedList fromDocIds(java.lang.Iterable<java.lang.String> ids)
ids - Iterable of external ids of relevant documents.
RankedList representing relevant documentspublic static RankedList fromDocIds(java.lang.String[] ids)
ids - Array of String of external ids of relevant documents.
RankedList representing relevant documents
public void normalizeScores(int max,
int min)
max - New largest value to assignmin - New smallest value to assign
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||