public abstract class ServiceIdOp extends Object implements Comparator<Date>
| Modifier and Type | Field and Description |
|---|---|
static ServiceIdOp |
ARRIVAL_OP |
static ServiceIdOp |
BOTH_OP |
static ServiceIdOp |
DEPARTURE_OP |
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceIdOp(boolean reverse) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Date a,
Date b) |
int |
compareInterval(ServiceInterval interval,
Date serviceDate,
Date from,
Date to)
Returns -1 if the service interval comes before the from-to interval.
|
abstract int |
getFromTime(ServiceInterval interval) |
abstract Date |
getServiceDate(List<Date> data,
int index) |
abstract int |
getToTime(ServiceInterval interval) |
Date |
shiftTime(ServiceInterval interval,
Date time) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic static final ServiceIdOp ARRIVAL_OP
public static final ServiceIdOp DEPARTURE_OP
public static final ServiceIdOp BOTH_OP
public abstract int getFromTime(ServiceInterval interval)
public abstract int getToTime(ServiceInterval interval)
public int compare(Date a, Date b)
compare in interface Comparator<Date>public Date shiftTime(ServiceInterval interval, Date time)
public int compareInterval(ServiceInterval interval, Date serviceDate, Date from, Date to)
interval - serviceDate - from - to - Copyright © 2015 OneBusAway. All Rights Reserved.