edu.cmu.andrew.icalendar
Class EventComparator
java.lang.Object
|
+--edu.cmu.andrew.icalendar.EventComparator
- All Implemented Interfaces:
- Comparator
- Direct Known Subclasses:
- EventComparator.SortByCreationDate, EventComparator.SortByOwningAgenda, EventComparator.SortByStartDate, EventComparator.SortBySummary
- public abstract class EventComparator
- extends Object
- implements Comparator
Implementation of Comparator
for use with
Event
objects. Useful for
doing such things as putting events in java.util.TreeMap
and other collections that need to compare objects on insertion.
- Author:
- miles
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
SORT_BY_START_DATE_INSTANCE
public static final int SORT_BY_START_DATE_INSTANCE
SORT_BY_OWNING_AGENDA
public static final int SORT_BY_OWNING_AGENDA
SORT_BY_SUMMARY
public static final int SORT_BY_SUMMARY
SORT_BY_CREATION_DATE
public static final int SORT_BY_CREATION_DATE
FIRST_LESS_THAN
private static final int FIRST_LESS_THAN
EQUAL
private static final int EQUAL
FIRST_GREATER_THAN
private static final int FIRST_GREATER_THAN
EventComparator
public EventComparator()
compare
public abstract int compare(Object o1,
Object o2)
throws ClassCastException
- Specified by:
compare
in interface Comparator
equals
public abstract boolean equals(Object obj)
- Specified by:
equals
in interface Comparator
- Overrides:
equals
in class Object
getInstance
public static EventComparator getInstance()
getInstance
public static EventComparator getInstance(int type)
throws IllegalArgumentException