Package net.sf.gridarta.model.match
Class GameObjectMatchers
- java.lang.Object
-
- net.sf.gridarta.model.match.GameObjectMatchers
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<NamedGameObjectMatcher>
public class GameObjectMatchers extends java.lang.Object implements java.lang.Iterable<NamedGameObjectMatcher>, java.io.Serializable
MaintainsGameObjectMatcherinstances.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GameObjectMatchers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGameObjectMatcher(@NotNull NamedGameObjectMatcher gameObjectMatcher)Adds a newGameObjectMatcher.@NotNull java.util.Collection<NamedGameObjectMatcher>getFilters()Return all known game object matchers that should be used as filters.@Nullable GameObjectMatchergetMatcher(@NotNull java.lang.String... ids)Returns a matcher by id; returnsnullif the matcher does not exist.@Nullable GameObjectMatchergetMatcherWarn(@NotNull ErrorViewCollector errorViewCollector, @NotNull java.lang.String... ids)Returns a matcher by id; prints a warning if the matcher does not exist.java.util.Iterator<NamedGameObjectMatcher>iterator()
-
-
-
Method Detail
-
getMatcher
@Nullable public @Nullable GameObjectMatcher getMatcher(@NotNull @NotNull java.lang.String... ids)
Returns a matcher by id; returnsnullif the matcher does not exist.- Parameters:
ids- the ids to find- Returns:
- the matcher, or
nullif no such matcher exists
-
getMatcherWarn
@Nullable public @Nullable GameObjectMatcher getMatcherWarn(@NotNull @NotNull ErrorViewCollector errorViewCollector, @NotNull @NotNull java.lang.String... ids)
Returns a matcher by id; prints a warning if the matcher does not exist.- Parameters:
errorViewCollector- the error view collector to useids- the ids to find- Returns:
- the matcher, or
nullif no such matcher exists
-
getFilters
@NotNull public @NotNull java.util.Collection<NamedGameObjectMatcher> getFilters()
Return all known game object matchers that should be used as filters.- Returns:
- the filter game object matches
-
addGameObjectMatcher
public void addGameObjectMatcher(@NotNull @NotNull NamedGameObjectMatcher gameObjectMatcher)Adds a newGameObjectMatcher.- Parameters:
gameObjectMatcher- the game object matcher to add
-
iterator
public java.util.Iterator<NamedGameObjectMatcher> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<NamedGameObjectMatcher>
-
-