public class FilterGameObjectIterator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
implements java.util.Iterator<G>
Iterator
that filters another iterator according to a GameObjectMatcher
. Only game objects matching the matcher are returned.Constructor and Description |
---|
FilterGameObjectIterator(@NotNull java.util.Iterator<G> iterator,
@NotNull GameObjectMatcher matcher)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
G |
next() |
void |
remove() |
public FilterGameObjectIterator(@NotNull @NotNull java.util.Iterator<G> iterator, @NotNull @NotNull GameObjectMatcher matcher)
iterator
- the iterator to filtermatcher
- the game object matcher to filter withpublic boolean hasNext()
hasNext
in interface java.util.Iterator<G extends GameObject<G,A,R>>
public G next()
next
in interface java.util.Iterator<G extends GameObject<G,A,R>>
public void remove()
remove
in interface java.util.Iterator<G extends GameObject<G,A,R>>