Interface PqLongList


public interface PqLongList
Specialized list interface for INT64 values.

Provides primitive iteration without boxing overhead.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Perform an action for each element.
    long
    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.
    long[]
    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

      long get(int index)
      Get an element by index.
      Parameters:
      index - the element index (0-based)
      Returns:
      the long 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 long iterator
    • forEach

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

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