Interface PqDoubleList


public interface PqDoubleList
Specialized list interface for DOUBLE values.

Provides primitive iteration without boxing overhead.

  • Method Summary

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

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

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

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