public bool Equals(TripTime other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other.Index == Index); }
public static void InitializeTripTimes() { if (Times != null) { return; } Times = new TripTime[TOTAL_TRIP_TIMES]; var alternativeIndex = 0; foreach (var minuteSpan in DayPeriod.SmallDayPeriods) { var time = new TripTime(alternativeIndex, minuteSpan); Times[alternativeIndex++] = time; } }