T
- public static class QueryResultSet.ScoreComparator<T extends Publication> extends BasicComparator<T>
Comparator
compares two Object
s using a score
retrieved from a map of Object
to float
. MdateComparator
. Comparator
says see the
compare(Object, Object)
method.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARENT_COMPARATOR |
static java.lang.String |
QUERY_RESULT_SET |
channel, contextMap, jcmsContext, language, locale
Constructor and Description |
---|
QueryResultSet.ScoreComparator()
Initialize a
ScoreComparator from the contextual information
retrieved through ComparatorManager parameter
A parent Comparator , is retrieved using attribute
PARENT_COMPARATOR , if null, default with MdateComparator . |
QueryResultSet.ScoreComparator(QueryResultSet resultSet,
java.util.Comparator parentComparator)
Initialize a
ScoreComparator using the given parent
Comparator , if null, default with MdateComparator . |
Modifier and Type | Method and Description |
---|---|
int |
compare(T o1,
T o2)
Compare two Object using their score from the QueryResulSet.
|
compareDate
public static final java.lang.String PARENT_COMPARATOR
public static final java.lang.String QUERY_RESULT_SET
public QueryResultSet.ScoreComparator()
ScoreComparator
from the contextual information
retrieved through ComparatorManager parameter
Comparator
, is retrieved using attribute
PARENT_COMPARATOR
, if null, default with MdateComparator
.QueryResultSet
, is retrieved using attribute
QUERY_RESULT_SET
, must not be null.java.lang.IllegalArgumentException
- if QueryResultSet is nullpublic QueryResultSet.ScoreComparator(QueryResultSet resultSet, java.util.Comparator parentComparator)
ScoreComparator
using the given parent
Comparator
, if null, default with MdateComparator
.resultSet
- the QueryResultSet
from which to retrieve
score of each Publication
.parentComparator
- the Comparator
to use when score of
compared Object
are identical.java.lang.IllegalArgumentException
- if QueryResultSet is nullpublic int compare(T o1, T o2)
compare
in interface java.util.Comparator<T extends Publication>
compare
in class BasicStorable.CdateComparator<T extends Publication>
Copyright © 2001-2010 Jalios SA. All Rights Reserved.