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>
  • Field Details

    • ARRIVAL_OP

      public static final ServiceIdOp ARRIVAL_OP
    • DEPARTURE_OP

      public static final ServiceIdOp DEPARTURE_OP
    • BOTH_OP

      public static final ServiceIdOp BOTH_OP
  • Constructor Details

    • ServiceIdOp

      protected ServiceIdOp(boolean reverse)
  • Method Details

    • 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: