Interface PqIntList


public interface PqIntList
Specialized list interface for INT32 values.

Provides primitive iteration without boxing overhead.

PqIntList scores = row.getIntList("scores");
for (var it = scores.iterator(); it.hasNext(); ) {
    int score = it.nextInt();
}

// Or with forEach:
scores.forEach(score -> System.out.println(score));
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Perform an action for each element.
    int
    get(int index)
    Get an element by index.
    boolean
    Check if this list is empty.
    boolean
    isNull(int index)
    Check if an element is null by index.
    Get a primitive iterator over the elements.
    int
    Get the number of elements in this list.
    int[]
    Convert to a primitive array.
  • Method Details

    • size

      int size()
      Get the number of elements in this list.
      Returns:
      the element count
    • isEmpty

      boolean isEmpty()
      Check if this list is empty.
      Returns:
      true if the list has no elements
    • get

      int get(int index)
      Get an element by index.
      Parameters:
      index - the element index (0-based)
      Returns:
      the int value
      Throws:
      NullPointerException - if the element is null
      IndexOutOfBoundsException - if index is out of range
    • isNull

      boolean isNull(int index)
      Check if an element is null by index.
      Parameters:
      index - the element index (0-based)
      Returns:
      true if the element is null
    • iterator

      Get a primitive iterator over the elements.
      Returns:
      a primitive int iterator
    • forEach

      void forEach(IntConsumer action)
      Perform an action for each element.
      Parameters:
      action - the action to perform
    • toArray

      int[] toArray()
      Convert to a primitive array.
      Returns:
      a new array containing all elements