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 Object implements Enumeration<IndexTreePath<E>>
Modifier and Type | Field and Description |
---|---|
Enumeration<IndexTreePath<E>> |
EMPTY_ENUMERATION
Represents an empty enumeration.
|
private IndexTree<N,E> |
index
The index storing the nodes.
|
private Queue<Enumeration<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 |
hasMoreElements()
Tests if this enumeration contains more elements.
|
IndexTreePath<E> |
nextElement()
Returns the next element of this enumeration if this enumeration object has
at least one more element to provide.
|
public final Enumeration<IndexTreePath<E extends Entry>> EMPTY_ENUMERATION
private Queue<Enumeration<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 hasMoreElements()
hasMoreElements
in interface Enumeration<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> nextElement()
nextElement
in interface Enumeration<IndexTreePath<E extends Entry>>
NoSuchElementException
- if no more elements exist.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.