org.onebusaway.gtfs.impl.calendar
Class ServiceIdOp
java.lang.Object
org.onebusaway.gtfs.impl.calendar.ServiceIdOp
- All Implemented Interfaces:
- Comparator<Date>
public abstract class ServiceIdOp
- extends Object
- implements Comparator<Date>
|
Constructor Summary |
protected |
ServiceIdOp(boolean reverse)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ARRIVAL_OP
public static final ServiceIdOp ARRIVAL_OP
DEPARTURE_OP
public static final ServiceIdOp DEPARTURE_OP
BOTH_OP
public static final ServiceIdOp BOTH_OP
ServiceIdOp
protected ServiceIdOp(boolean reverse)
getFromTime
public abstract int getFromTime(ServiceInterval interval)
getToTime
public abstract int getToTime(ServiceInterval interval)
getServiceDate
public abstract Date getServiceDate(List<Date> data,
int index)
compare
public int compare(Date a,
Date b)
- Specified by:
compare in interface Comparator<Date>
shiftTime
public Date shiftTime(ServiceInterval interval,
Date time)
compareInterval
public int compareInterval(ServiceInterval interval,
Date serviceDate,
Date from,
Date to)
- 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:
Copyright © 2011 OneBusAway. All Rights Reserved.