Пример #1
0
 /** Required by Hibernate */
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Trip other = (Trip) obj;
   if (blockId == null) {
     if (other.blockId != null) return false;
   } else if (!blockId.equals(other.blockId)) return false;
   if (configRev != other.configRev) return false;
   if (directionId == null) {
     if (other.directionId != null) return false;
   } else if (!directionId.equals(other.directionId)) return false;
   if (endTime == null) {
     if (other.endTime != null) return false;
   } else if (!endTime.equals(other.endTime)) return false;
   if (exactTimesHeadway != other.exactTimesHeadway) return false;
   if (headsign == null) {
     if (other.headsign != null) return false;
   } else if (!headsign.equals(other.headsign)) return false;
   if (noSchedule != other.noSchedule) return false;
   if (route == null) {
     if (other.route != null) return false;
   } else if (!route.equals(other.route)) return false;
   if (routeId == null) {
     if (other.routeId != null) return false;
   } else if (!routeId.equals(other.routeId)) return false;
   if (routeShortName == null) {
     if (other.routeShortName != null) return false;
   } else if (!routeShortName.equals(other.routeShortName)) return false;
   if (scheduledTimesList == null) {
     if (other.scheduledTimesList != null) return false;
   } else if (!scheduledTimesList.equals(other.scheduledTimesList)) return false;
   if (serviceId == null) {
     if (other.serviceId != null) return false;
   } else if (!serviceId.equals(other.serviceId)) return false;
   if (shapeId == null) {
     if (other.shapeId != null) return false;
   } else if (!shapeId.equals(other.shapeId)) return false;
   if (startTime == null) {
     if (other.startTime != null) return false;
   } else if (!startTime.equals(other.startTime)) return false;
   if (travelTimes == null) {
     if (other.travelTimes != null) return false;
   } else if (!travelTimes.equals(other.travelTimes)) return false;
   if (tripId == null) {
     if (other.tripId != null) return false;
   } else if (!tripId.equals(other.tripId)) return false;
   if (tripPattern == null) {
     if (other.tripPattern != null) return false;
   } else if (!tripPattern.equals(other.tripPattern)) return false;
   if (tripShortName == null) {
     if (other.tripShortName != null) return false;
   } else if (!tripShortName.equals(other.tripShortName)) return false;
   return true;
 }
Пример #2
0
 /** Required by Hibernate */
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((blockId == null) ? 0 : blockId.hashCode());
   result = prime * result + configRev;
   result = prime * result + ((directionId == null) ? 0 : directionId.hashCode());
   result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
   result = prime * result + (exactTimesHeadway ? 1231 : 1237);
   result = prime * result + ((headsign == null) ? 0 : headsign.hashCode());
   result = prime * result + (noSchedule ? 1231 : 1237);
   result = prime * result + ((route == null) ? 0 : route.hashCode());
   result = prime * result + ((routeId == null) ? 0 : routeId.hashCode());
   result = prime * result + ((routeShortName == null) ? 0 : routeShortName.hashCode());
   result = prime * result + ((scheduledTimesList == null) ? 0 : scheduledTimesList.hashCode());
   result = prime * result + ((serviceId == null) ? 0 : serviceId.hashCode());
   result = prime * result + ((shapeId == null) ? 0 : shapeId.hashCode());
   result = prime * result + ((startTime == null) ? 0 : startTime.hashCode());
   result = prime * result + ((travelTimes == null) ? 0 : travelTimes.hashCode());
   result = prime * result + ((tripId == null) ? 0 : tripId.hashCode());
   result = prime * result + ((tripPattern == null) ? 0 : tripPattern.hashCode());
   result = prime * result + ((tripShortName == null) ? 0 : tripShortName.hashCode());
   return result;
 }
Пример #3
0
 /**
  * Returns the travel time info for the path specified by the stopPathIndex.
  *
  * @param stopPathIndex
  * @return
  */
 public TravelTimesForStopPath getTravelTimesForStopPath(int stopPathIndex) {
   return travelTimes.getTravelTimesForStopPath(stopPathIndex);
 }