List<Integer> offsetsIntoIndex = new ArrayList<Integer>();
for (int in = fromIndex; in < toIndex; in++) {
FrequencyBlockStopTimeEntry entry = frequencyStopTimes.get(in);
BlockStopTimeEntry bst = entry.getStopTime();
FrequencyEntry frequency = entry.getFrequency();
InstanceState state = new InstanceState(serviceDate.getTime(), frequency);
switch (frequencyBehavior) {
case INCLUDE_UNSPECIFIED: {
stopTimeInstances.add(new StopTimeInstance(bst, state));
offsetsIntoIndex.add(in);
break;
}
case INCLUDE_INTERPOLATED: {
int stopTimeOffset = entry.getStopTimeOffset();
int tFrom = Math.max(relativeFrom, frequency.getStartTime());
int tTo = Math.min(relativeTo, frequency.getEndTime());
tFrom = snapToFrequencyStopTime(frequency, tFrom, stopTimeOffset,