Class SingleTimeWindowIterator

  • All Implemented Interfaces:
    ITimeRangeIterator

    public class SingleTimeWindowIterator
    extends java.lang.Object
    implements ITimeRangeIterator
    Used for aggregation with only one time window. i.e. Aggregation without group by.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long currentOutputTime()
      As there is only one timestamp can be output for a time range, this method will return the output time based on leftCloseRightOpen or not.
      org.apache.iotdb.tsfile.read.common.TimeRange getFirstTimeRange()
      return the first time range by sorting order
      long getTotalIntervalNum()  
      boolean hasNextTimeRange()  
      boolean isAscending()  
      org.apache.iotdb.tsfile.read.common.TimeRange nextTimeRange()
      return the next time range according to curStartTime (the start time of the last returned time range)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SingleTimeWindowIterator

        public SingleTimeWindowIterator​(long startTime,
                                        long endTime)
    • Method Detail

      • hasNextTimeRange

        public boolean hasNextTimeRange()
        Specified by:
        hasNextTimeRange in interface ITimeRangeIterator
        Returns:
        whether current iterator has next time range
      • nextTimeRange

        public org.apache.iotdb.tsfile.read.common.TimeRange nextTimeRange()
        Description copied from interface: ITimeRangeIterator
        return the next time range according to curStartTime (the start time of the last returned time range)
        Specified by:
        nextTimeRange in interface ITimeRangeIterator
      • currentOutputTime

        public long currentOutputTime()
        Description copied from interface: ITimeRangeIterator
        As there is only one timestamp can be output for a time range, this method will return the output time based on leftCloseRightOpen or not.
        Specified by:
        currentOutputTime in interface ITimeRangeIterator
        Returns:
        minTime if leftCloseRightOpen, else maxTime.