20 package net.sf.gridarta.model.match;
22 import java.io.Serializable;
23 import java.util.ArrayList;
24 import java.util.Collection;
25 import java.util.Collections;
26 import java.util.HashMap;
27 import java.util.HashSet;
28 import java.util.Iterator;
32 import org.jetbrains.annotations.NotNull;
33 import org.jetbrains.annotations.Nullable;
69 for (
final String
id : ids) {
71 if (matcher != null) {
87 if (matcher == null) {
99 final Collection<NamedGameObjectMatcher> result =
new HashSet<>(gameObjectMatchersByIds.size());
101 if (!matcher.isSystemMatcher()) {
113 gameObjectMatchers.add(gameObjectMatcher);
114 gameObjectMatchersByIds.put(gameObjectMatcher.getID(), gameObjectMatcher);
118 public Iterator<NamedGameObjectMatcher>
iterator() {
119 return Collections.unmodifiableCollection(gameObjectMatchers).iterator();
final Map< String, NamedGameObjectMatcher > gameObjectMatchersByIds
Map with game object object matchers and their IDs.
Convenience class for adding messages to a ErrorView instance using a fixed category name...
Interface for classes that match GameObjects.
final Collection< NamedGameObjectMatcher > gameObjectMatchers
List with game object matchers.
Decorates an arbitrary GameObjectMatcher with a localized name that is suitable for the user interfac...
Defines possible error categories for ErrorView instances.
void addGameObjectMatcher(@NotNull final NamedGameObjectMatcher gameObjectMatcher)
Adds a new GameObjectMatcher.
Base package of all Gridarta classes.
static final long serialVersionUID
The serial version UID.
GAMEOBJECTMATCHERS_ENTRY_INVALID
GameObjectMatcher getMatcher(@NotNull final String... ids)
Returns a matcher by id; returns.
Maintains GameObjectMatcher instances.
Collection< NamedGameObjectMatcher > getFilters()
Return all known game object matchers that should be used as filters.
GameObjectMatcher getMatcherWarn(@NotNull final ErrorViewCollector errorViewCollector, @NotNull final String... ids)
Returns a matcher by id; prints a warning if the matcher does not exist.
Iterator< NamedGameObjectMatcher > iterator()