Module org.arakhne.afc.gis.giscore
Package org.arakhne.afc.gis.tree
Class BudgetIterator<P extends GISPrimitive,N extends AbstractGISTreeSetNode<P,N>>
- java.lang.Object
-
- org.arakhne.afc.gis.tree.BudgetIterator<P,N>
-
- Type Parameters:
P
- is the type of the data inside the tree.N
- the type of the nodes.
- All Implemented Interfaces:
Iterator<P>
class BudgetIterator<P extends GISPrimitive,N extends AbstractGISTreeSetNode<P,N>> extends Object implements Iterator<P>
This class provides a broad-first iterator supplying the data elements according to a maximum number of data to reply, the budget.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:53
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- giscore
-
-
Constructor Summary
Constructors Constructor Description BudgetIterator(Tree<P,N> tree, Rectangle2afp<?,?,?,?,?,?> clipBounds, int budget)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
P
next()
void
remove()
-
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
forEachRemaining
-
-
-
-
Constructor Detail
-
BudgetIterator
BudgetIterator(Tree<P,N> tree, Rectangle2afp<?,?,?,?,?,?> clipBounds, int budget)
Constructor.- Parameters:
tree
- is the tree to iterator on.clipBounds
- is the bounds outside which the elements will not be repliedbudget
- is the maximal size of the replied list. If this value is negative, all the elements will be replied.
-
-
Method Detail
-
hasNext
@Pure public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<P extends GISPrimitive>
-
next
public P next()
- Specified by:
next
in interfaceIterator<P extends GISPrimitive>
-
remove
public void remove()
- Specified by:
remove
in interfaceIterator<P extends GISPrimitive>
-
-