Package net.sf.gridarta.model.match
Class MutableOrGameObjectMatcher
- java.lang.Object
-
- net.sf.gridarta.model.match.MutableOrGameObjectMatcher
-
- All Implemented Interfaces:
java.io.Serializable,GameObjectMatcher
public class MutableOrGameObjectMatcher extends java.lang.Object implements GameObjectMatcher
AGameObjectMatcherthat delegates to otherGameObjectMatchers. If empty,isMatching(GameObject)returnstrue.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MutableOrGameObjectMatcher(boolean defaultState)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArchObjectMatcher(@NotNull GameObjectMatcher gameObjectMatcher)Adds aGameObjectMatcher.booleancontainsArchObjectMatcher(@NotNull GameObjectMatcher gameObjectMatcher)Checks whether a certainGameObjectMatcheris contained in this matcher.booleanisMatching(@NotNull GameObject<?,?,?> gameObject)Matches aGameObject.voidremoveAll()Removes allGameObjectMatchers.voidremoveArchObjectMatcher(@NotNull GameObjectMatcher gameObjectMatcher)Removes aGameObjectMatcher.
-
-
-
Method Detail
-
isMatching
public boolean isMatching(@NotNull @NotNull GameObject<?,?,?> gameObject)Description copied from interface:GameObjectMatcherMatches aGameObject.- Specified by:
isMatchingin interfaceGameObjectMatcher- Parameters:
gameObject- theGameObjectto match- Returns:
trueif this matcher matches the given game object, otherwisefalse
-
addArchObjectMatcher
public void addArchObjectMatcher(@NotNull @NotNull GameObjectMatcher gameObjectMatcher)Adds aGameObjectMatcher. The suppliedGameObjectMatcheris only really added if it isn't already included, e.g.containsArchObjectMatcher(GameObjectMatcher)returnsfalse.- Parameters:
gameObjectMatcher- the matcher to add
-
removeArchObjectMatcher
public void removeArchObjectMatcher(@NotNull @NotNull GameObjectMatcher gameObjectMatcher)Removes aGameObjectMatcher.- Parameters:
gameObjectMatcher- the matcher to remove
-
containsArchObjectMatcher
public boolean containsArchObjectMatcher(@NotNull @NotNull GameObjectMatcher gameObjectMatcher)Checks whether a certainGameObjectMatcheris contained in this matcher.- Parameters:
gameObjectMatcher- the matcher to check- Returns:
trueif the matcher is contained in this, otherwisefalse
-
removeAll
public void removeAll()
Removes allGameObjectMatchers.
-
-