N - the type of Node used in the indexE - the type of Entry used in the indexpublic class BreadthFirstEnumeration<N extends Node<E>,E extends Entry> extends java.lang.Object implements java.util.Iterator<IndexTreePath<E>>
| Modifier and Type | Field and Description |
|---|---|
java.util.Iterator<IndexTreePath<E>> |
EMPTY_ENUMERATION
Represents an empty enumeration.
|
private IndexTree<N,E> |
index
The index storing the nodes.
|
private java.util.Queue<java.util.Iterator<IndexTreePath<E>>> |
queue
The queue for the enumeration.
|
| Constructor and Description |
|---|
BreadthFirstEnumeration(IndexTree<N,E> index,
IndexTreePath<E> rootPath)
Creates a new breadth first enumeration with the specified node as root
node.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Tests if this enumeration contains more elements.
|
IndexTreePath<E> |
next()
Returns the next element of this enumeration if this enumeration object has
at least one more element to provide.
|
public final java.util.Iterator<IndexTreePath<E extends Entry>> EMPTY_ENUMERATION
private java.util.Queue<java.util.Iterator<IndexTreePath<E extends Entry>>> queue
public BreadthFirstEnumeration(IndexTree<N,E> index, IndexTreePath<E> rootPath)
index - the index tree storing the nodesrootPath - the root entry of the enumerationpublic boolean hasNext()
hasNext in interface java.util.Iterator<IndexTreePath<E extends Entry>>true if and only if this enumeration object contains
at least one more element to provide; false otherwise.public IndexTreePath<E> next()
next in interface java.util.Iterator<IndexTreePath<E extends Entry>>java.util.NoSuchElementException - if no more elements exist.Copyright © 2019 ELKI Development Team. License information.