org.workjournal
Class JournalEntryComparator
java.lang.Object
|
+--org.workjournal.JournalEntryComparator
- All Implemented Interfaces:
- java.util.Comparator
- public final class JournalEntryComparator
- extends java.lang.Object
- implements java.util.Comparator
EntryComparator is used to compare journal entries when
the journal is sorted.
|
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compare one journal entry to another. |
boolean |
equals(java.lang.Object obj)
Determine if this comparator equals the given object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JournalEntryComparator
public JournalEntryComparator()
- Construct a new journal entry comparator.
equals
public boolean equals(java.lang.Object obj)
- Determine if this comparator equals the given object.
- Specified by:
equals in interface java.util.Comparator- Overrides:
equals in class java.lang.Object
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Compare one journal entry to another.
- Specified by:
compare in interface java.util.Comparator
- Parameters:
o1 - 1st object to compare.o2 - 2nd object to compare.- Returns:
- 0 if o1 == o2, negative if o1 < o2, positive if o1 < o2.