int index = 0;
for (T entry : entries) {
ServiceInterval interval = null;
List<BlockStopTimeEntry> stopTimes = entry.getStopTimes();
StopTimeEntry first = stopTimes.get(0).getStopTime();
StopTimeEntry last = stopTimes.get(stopTimes.size() - 1).getStopTime();
interval = extend(interval, first);
interval = extend(interval, last);
minArrivals[index] = interval.getMinArrival();
minDepartures[index] = interval.getMinDeparture();
maxArrivals[index] = interval.getMaxArrival();
maxDepartures[index] = interval.getMaxDeparture();
index++;
}
return new ServiceIntervalBlock(minArrivals, minDepartures, maxArrivals,