Package io.vavr.collection
Class HashArrayMappedTrieModule.LeafNodeIterator<K,V>
java.lang.Object
io.vavr.collection.AbstractIterator<HashArrayMappedTrieModule.LeafNode<K,V>>
io.vavr.collection.HashArrayMappedTrieModule.LeafNodeIterator<K,V>
- All Implemented Interfaces:
Foldable<HashArrayMappedTrieModule.LeafNode<K,,V>> Iterator<HashArrayMappedTrieModule.LeafNode<K,,V>> Traversable<HashArrayMappedTrieModule.LeafNode<K,,V>> Value<HashArrayMappedTrieModule.LeafNode<K,,V>> Iterable<HashArrayMappedTrieModule.LeafNode<K,,V>> Iterator<HashArrayMappedTrieModule.LeafNode<K,V>>
- Enclosing interface:
HashArrayMappedTrieModule
public static class HashArrayMappedTrieModule.LeafNodeIterator<K,V>
extends AbstractIterator<HashArrayMappedTrieModule.LeafNode<K,V>>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <K,V> int downstairs(Object[] nodes, int[] indexes, HashArrayMappedTrieModule.AbstractNode<K, V> root, int level) private Objectprivate static <K,V> HashArrayMappedTrieModule.AbstractNode <K, V> getChild(HashArrayMappedTrieModule.AbstractNode<K, V> node, int index) protected HashArrayMappedTrieModule.LeafNode<K, V> getNext()booleanhasNext()Methods inherited from class io.vavr.collection.AbstractIterator
next, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.vavr.collection.Foldable
fold, reduce, reduceOptionMethods inherited from interface io.vavr.collection.Iterator
collect, concat, distinct, distinctBy, distinctBy, drop, dropRight, dropUntil, dropWhile, filter, findLast, flatMap, foldRight, get, groupBy, grouped, hasDefiniteSize, head, init, initOption, intersperse, isAsync, isEmpty, isLazy, isSequential, isTraversableAgain, iterator, last, length, map, orElse, orElse, partition, peek, reduceLeft, reduceRight, reject, replace, replaceAll, retainAll, scan, scanLeft, scanRight, slideBy, sliding, sliding, span, stringPrefix, tail, tailOption, take, takeRight, takeUntil, takeWhile, transform, unzip, unzip3, zip, zipAll, zipWith, zipWithIndex, zipWithIndexMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods inherited from interface io.vavr.collection.Traversable
arrangeBy, average, containsAll, count, equals, existsUnique, find, foldLeft, forEachWithIndex, hashCode, headOption, isDistinct, isOrdered, isSingleValued, lastOption, max, maxBy, maxBy, min, minBy, minBy, mkCharSeq, mkCharSeq, mkCharSeq, mkString, mkString, mkString, nonEmpty, product, reduceLeftOption, reduceRightOption, single, singleOption, size, spliterator, sumMethods inherited from interface io.vavr.Value
collect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, getOrNull, out, out, stderr, stdout, toArray, toCharSeq, toCompletableFuture, toEither, toEither, toInvalid, toInvalid, toJavaArray, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaMap, toJavaOptional, toJavaParallelStream, toJavaSet, toJavaSet, toJavaStream, toLeft, toLeft, toLinkedMap, toLinkedMap, toLinkedSet, toList, toMap, toMap, toOption, toPriorityQueue, toPriorityQueue, toQueue, toRight, toRight, toSet, toSortedMap, toSortedMap, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toStream, toTree, toTree, toTry, toTry, toValid, toValid, toValidation, toValidation, toVector
-
Field Details
-
MAX_LEVELS
private static final int MAX_LEVELS- See Also:
-
total
private final int total -
nodes
-
indexes
private final int[] indexes -
level
private int level -
ptr
private int ptr
-
-
Constructor Details
-
LeafNodeIterator
LeafNodeIterator(HashArrayMappedTrieModule.AbstractNode<K, V> root)
-
-
Method Details
-
hasNext
public boolean hasNext() -
getNext
- Specified by:
getNextin classAbstractIterator<HashArrayMappedTrieModule.LeafNode<K,V>>
-
findNextLeaf
-
downstairs
private static <K,V> int downstairs(Object[] nodes, int[] indexes, HashArrayMappedTrieModule.AbstractNode<K, V> root, int level) -
getChild
private static <K,V> HashArrayMappedTrieModule.AbstractNode<K,V> getChild(HashArrayMappedTrieModule.AbstractNode<K, V> node, int index)
-