public DeviceStartEndTime next() {
    IDeviceID deviceID = currentDevice.next();
    // iterating the index, must present
    //noinspection OptionalGetWithoutIsPresent
    return new DeviceStartEndTime(
        deviceID,
        deviceTimeIndex.getStartTime(deviceID).get(),
        deviceTimeIndex.getEndTime(deviceID).get());
  }
This class is used to iterate over the devicesTimeIndex in a TsFile to get the start and end
times of each device.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileDeviceStartEndTimeIterator.java