20 package net.sf.gridarta.model.mapmodel;
22 import java.util.Iterator;
23 import java.util.NoSuchElementException;
28 import org.jetbrains.annotations.NotNull;
29 import org.jetbrains.annotations.Nullable;
82 throw new NoSuchElementException();
84 findNextPending =
true;
89 public void remove() {
90 if (findNextPending) {
91 throw new IllegalStateException();
93 findNextPending =
true;
102 if (!findNextPending) {
105 findNextPending =
false;
108 if (!iterator.hasNext()) {
113 final G tmp = iterator.next();
FilterGameObjectIterator(@NotNull final Iterator< G > iterator, @NotNull final GameObjectMatcher matcher)
Creates a new instance.
Interface for classes that match GameObjects.
This package contains classes related to matching GameObjects, so called GameObjectMatchers.
boolean findNextPending
Whether findNext() has to be called.
void findNext()
Updates next to hold the next matching game object.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
An Iterator that filters another iterator according to a GameObjectMatcher.
G next
The next element to return from next() or.
GameObjects are the objects based on Archetypes found on maps.
final Iterator< G > iterator
The Iterator being filtered.
final GameObjectMatcher matcher
The GameObjectMatcher for filtering returned game objects.
Interface for MapArchObjects.
boolean isMatching(@NotNull GameObject<?, ?, ?> gameObject)
Matches an GameObject.