public class MutableOrGameObjectMatcher extends java.lang.Object implements GameObjectMatcher
GameObjectMatcher
that delegates to other GameObjectMatcher
s. If empty, isMatching(GameObject)
returns true
.Constructor and Description |
---|
MutableOrGameObjectMatcher(boolean defaultState)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addArchObjectMatcher(GameObjectMatcher gameObjectMatcher)
Adds an
GameObjectMatcher . |
boolean |
containsArchObjectMatcher(GameObjectMatcher gameObjectMatcher)
Checks whether a certain
GameObjectMatcher is contained in this
matcher. |
boolean |
isMatching(GameObject<?,?,?> gameObject)
Matches an
GameObject . |
void |
removeAll()
Removes all
GameObjectMatchers . |
void |
removeArchObjectMatcher(GameObjectMatcher gameObjectMatcher)
Removes an
GameObjectMatcher . |
public MutableOrGameObjectMatcher(boolean defaultState)
defaultState
- the default matching state when gameObjectMatchers
is emptypublic boolean isMatching(@NotNull GameObject<?,?,?> gameObject)
GameObject
.isMatching
in interface GameObjectMatcher
gameObject
- the GameObject
to matchtrue
if this matcher matches the given game object,
otherwise false
public void addArchObjectMatcher(@NotNull GameObjectMatcher gameObjectMatcher)
GameObjectMatcher
. The supplied GameObjectMatcher
is only really added if it isn't already included, e.g. containsArchObjectMatcher(GameObjectMatcher)
returns false
.gameObjectMatcher
- the matcher to addpublic void removeArchObjectMatcher(@NotNull GameObjectMatcher gameObjectMatcher)
GameObjectMatcher
.gameObjectMatcher
- the matcher to removepublic boolean containsArchObjectMatcher(@NotNull GameObjectMatcher gameObjectMatcher)
GameObjectMatcher
is contained in this
matcher.gameObjectMatcher
- the matcher to checktrue
if the matcher is contained in this, otherwise
false
public void removeAll()
GameObjectMatchers
.