Class RunEndEncodedVector.RangeIterator

java.lang.Object
org.apache.arrow.vector.complex.RunEndEncodedVector.RangeIterator
Enclosing class:
RunEndEncodedVector

public static class RunEndEncodedVector.RangeIterator extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    RangeIterator(RunEndEncodedVector runEndEncodedVector, int startIndex, int length)
    Constructs a new RangeIterator for iterating over a range of values in a RunEndEncodedVector.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the current run index (physical position in the run-ends vector).
    int
    Gets the length of the current run within the iterator's range.
    boolean
    Checks if iteration has completed.
    boolean
    Advances to the next run in the range.
    boolean
    Advances to the next value in the range.

    Methods inherited from class java.lang.Object

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

    • RangeIterator

      public RangeIterator(RunEndEncodedVector runEndEncodedVector, int startIndex, int length)
      Constructs a new RangeIterator for iterating over a range of values in a RunEndEncodedVector.
      Parameters:
      runEndEncodedVector - The vector to iterate over
      startIndex - The logical start index of the range (inclusive)
      length - The number of values to include in the range
      Throws:
      IllegalArgumentException - if startIndex is negative or (startIndex + length) exceeds vector bounds
  • Method Details

    • nextRun

      public boolean nextRun()
      Advances to the next run in the range.
      Returns:
      true if there is another run available, false if iteration has completed
    • nextValue

      public boolean nextValue()
      Advances to the next value in the range.
      Returns:
      true if there is another value available, false if iteration has completed
    • getRunIndex

      public int getRunIndex()
      Gets the current run index (physical position in the run-ends vector).
      Returns:
      the current run index
    • getRunLength

      public int getRunLength()
      Gets the length of the current run within the iterator's range.
      Returns:
      the number of remaining values in current run within the iterator's range
    • isEnd

      public boolean isEnd()
      Checks if iteration has completed.
      Returns:
      true if all values in the range have been processed, false otherwise