HnswGraph.DenseNodesIterator (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.util.hnsw, class: HnswGraph, class: DenseNodesIterator

Package org.apache.lucene.util.hnsw

# Class HnswGraph.DenseNodesIterator

java.lang.Object
org.apache.lucene.util.hnsw.HnswGraph.NodesIterator
org.apache.lucene.util.hnsw.HnswGraph.DenseNodesIterator

All Implemented Interfaces:
  `Iterator<Integer>`, `PrimitiveIterator<Integer,IntConsumer>`, `PrimitiveIterator.OfInt`

Enclosing class:
  `HnswGraph`

public static class HnswGraph.DenseNodesIterator extends HnswGraph.NodesIterator
NodesIterator that enumerates [0, size)

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface java.util.PrimitiveIterator

  `PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong`

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.util.hnsw.HnswGraph.NodesIterator

  `size`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DenseNodesIterator(int size)`
  Sole constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `consume(int[] dest)`
  Consume integers from the iterator and place them into the `dest` array.
  `boolean`
  `hasNext()`
  `int`
  `nextInt()`

  ### Methods inherited from class org.apache.lucene.util.hnsw.HnswGraph.NodesIterator

  `size`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.util.Iterator

  `remove`

  ### Methods inherited from interface java.util.PrimitiveIterator.OfInt

  `forEachRemaining, forEachRemaining, next`

- ## Constructor Details

  - ### DenseNodesIterator

    public DenseNodesIterator(int size)
    Sole constructor

- ## Method Details

  - ### consume

    public int consume(int[] dest)
    Description copied from class: `HnswGraph.NodesIterator`
    Consume integers from the iterator and place them into the `dest` array.
    Specified by:
      `consume` in class `HnswGraph.NodesIterator`
    Parameters:
      `dest` - where to put the integers
    Returns:
      The number of integers written to `dest`

  - ### nextInt

    public int nextInt()

  - ### hasNext

    public boolean hasNext()