Class ServiceIdOp
java.lang.Object
org.onebusaway.gtfs.impl.calendar.ServiceIdOp
- All Implemented Interfaces:
Comparator<Date>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ServiceIdOpstatic final ServiceIdOpstatic final ServiceIdOp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintcompareInterval(ServiceInterval interval, Date serviceDate, Date from, Date to) Returns -1 if the service interval comes before the from-to interval.abstract intgetFromTime(ServiceInterval interval) abstract DategetServiceDate(List<Date> data, int index) abstract intgetToTime(ServiceInterval interval) shiftTime(ServiceInterval interval, Date time) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
ARRIVAL_OP
-
DEPARTURE_OP
-
BOTH_OP
-
-
Constructor Details
-
ServiceIdOp
protected ServiceIdOp(boolean reverse)
-
-
Method Details
-
getFromTime
-
getToTime
-
getServiceDate
-
compare
- Specified by:
comparein interfaceComparator<Date>
-
shiftTime
-
compareInterval
Returns -1 if the service interval comes before the from-to interval. Returns 0 if the service interval overlaps the from-to interval. Returns 1 if the service interval comes after the from-to interval- Parameters:
interval-serviceDate-from-to-- Returns:
-