Class ElementAddressableVectorIterator<T extends ElementAddressableVector>

java.lang.Object
org.apache.arrow.vector.util.ElementAddressableVectorIterator<T>
Type Parameters:
T - vector type.
All Implemented Interfaces:
Iterator<ArrowBufPointer>

public class ElementAddressableVectorIterator<T extends ElementAddressableVector> extends Object implements Iterator<ArrowBufPointer>
Iterator for traversing elements of a ElementAddressableVector.
  • Constructor Details

    • ElementAddressableVectorIterator

      public ElementAddressableVectorIterator(T vector)
      Constructs an iterator for the ElementAddressableVector.
      Parameters:
      vector - the vector to iterate.
    • ElementAddressableVectorIterator

      public ElementAddressableVectorIterator(T vector, ArrowBufHasher hasher)
      Constructs an iterator for the ElementAddressableVector.
      Parameters:
      vector - the vector to iterate.
      hasher - the hasher to calculate the hash code.
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T extends ElementAddressableVector>
    • next

      public ArrowBufPointer next()
      Retrieves the next pointer from the vector.
      Specified by:
      next in interface Iterator<T extends ElementAddressableVector>
      Returns:
      the pointer pointing to the next element in the vector. Note that the returned pointer is only valid before the next call to this method.
    • next

      public void next(ArrowBufPointer outPointer)
      Retrieves the next pointer from the vector.
      Parameters:
      outPointer - the pointer to populate.