Module org.apache.arrow.vector
Package org.apache.arrow.vector.complex
Class RunEndEncodedVector.RangeIterator
java.lang.Object
org.apache.arrow.vector.complex.RunEndEncodedVector.RangeIterator
- Enclosing class:
- RunEndEncodedVector
-
Constructor Summary
ConstructorsConstructorDescriptionRangeIterator(RunEndEncodedVector runEndEncodedVector, int startIndex, int length) Constructs a new RangeIterator for iterating over a range of values in a RunEndEncodedVector. -
Method Summary
Modifier and TypeMethodDescriptionintGets the current run index (physical position in the run-ends vector).intGets the length of the current run within the iterator's range.booleanisEnd()Checks if iteration has completed.booleannextRun()Advances to the next run in the range.booleanAdvances to the next value in the range.
-
Constructor Details
-
RangeIterator
Constructs a new RangeIterator for iterating over a range of values in a RunEndEncodedVector.- Parameters:
runEndEncodedVector- The vector to iterate overstartIndex- 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
-