|
DLESE Tools v1.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.dlese.dpc.index.DateFieldComparator
Compares two ResultDocs for sorting by date. A
DateField must have been encoded and
stored in the underlying Document of the
ResultDoc. The name of the field that holds the date
is passed into the constructor of this DateFieldComparator.
ResultDoc,
DateField| Field Summary | |
|---|---|
static int |
ASCENDING
Used to sort in ascending order by date. |
static int |
DESCENDING
Used to sort in descending order by date. |
| Constructor Summary | |
|---|---|
DateFieldComparator(String dateFieldName,
int sortOrder)
Constructor for this DateFieldComparator object. |
|
| Method Summary | |
|---|---|
int |
compare(Object o1,
Object o2)
Compares two ResultDocs for sorting by a date
field, indicated at construction time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Field Detail |
public static final int ASCENDING
public static final int DESCENDING
| Constructor Detail |
public DateFieldComparator(String dateFieldName,
int sortOrder)
dateFieldName - The name of the field that holds the date.sortOrder - Determines the order of sorting (ASCENDING or DESCENDING).| Method Detail |
public int compare(Object o1,
Object o2)
ResultDocs for sorting by a date
field, indicated at construction time.
compare in interface Comparatoro1 - The first Object.o2 - The second Object.
|
DLESE Tools v1.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||