Class HnswGraph.CollectionNodesIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.Integer>, java.util.PrimitiveIterator<java.lang.Integer,​java.util.function.IntConsumer>, java.util.PrimitiveIterator.OfInt
    Enclosing class:
    HnswGraph

    public static class HnswGraph.CollectionNodesIterator
    extends HnswGraph.NodesIterator
    Nodes iterator based on set representation of nodes.
    • Nested Class Summary

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

        java.util.PrimitiveIterator.OfDouble, java.util.PrimitiveIterator.OfInt, java.util.PrimitiveIterator.OfLong
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 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
    • Field Detail

    • Constructor Detail

      • CollectionNodesIterator

        public CollectionNodesIterator​(IntArrayList nodes)
        Constructor for iterator based on collection representing nodes
    • Method Detail

      • 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()