|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.lucidviews.util.DateComparator
public class DateComparator
A Comparator that compares dates.
Comparator,
FileDateComparator| Field Summary | |
|---|---|
protected NumberComparator |
_timestampComparator
The number comparator that will be used to compare UTC time. |
static DateComparator |
CHRONOLOGICAL
A DateComparator that puts dates into chronological order. |
static DateComparator |
REVERSE_CHRONOLOGICAL
A DateComparator that puts dates into reverse
chronological order. |
| Constructor Summary | |
|---|---|
protected |
DateComparator()
The default constructor. |
protected |
DateComparator(boolean reverse)
Create a comparator that will sort dates. |
| Method Summary | |
|---|---|
int |
compare(Date date1,
Date date2)
Compares two Dates for order. |
int |
compare(long timestamp1,
long timestamp2)
Compares two timestamps for order. |
int |
compare(Object o1,
Object o2)
|
boolean |
equals(Object obj)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final DateComparator CHRONOLOGICAL
DateComparator that puts dates into chronological order.
public static final DateComparator REVERSE_CHRONOLOGICAL
DateComparator that puts dates into reverse
chronological order.
protected NumberComparator _timestampComparator
| Constructor Detail |
|---|
protected DateComparator()
protected DateComparator(boolean reverse)
reverse - if set to false dates will be put in
chronological order; if set to true dates
will be put in reverse chronological order| Method Detail |
|---|
public int compare(Date date1,
Date date2)
Dates for order. Returns a negative integer,
zero, or a positive integer as the first date is less than, equal
to, or greater than the second.
date1 - the first date to be compareddate2 - the second date to be compared
public int compare(long timestamp1,
long timestamp2)
timestamp1 - the first timestamp to be comparedtimestamp2 - the second timestamp to be compared
public int compare(Object o1,
Object o2)
compare in interface Comparatorpublic boolean equals(Object obj)
equals in interface Comparatorequals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||