public class MutableNameGameObjectMatcher extends java.lang.Object implements GameObjectMatcher
GameObjectMatcher
that simply matches a archetype name. This is
probably the most basic and most simple implementation of GameObjectMatcher
.Constructor and Description |
---|
MutableNameGameObjectMatcher(@NotNull java.lang.String name)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@NotNull java.lang.String |
getName()
Returns the archetype name matched by this matcher.
|
boolean |
isMatching(@NotNull GameObject<?,?,?> gameObject)
Matches a
GameObject . |
void |
setName(@NotNull java.lang.String name)
Sets the archetype name to match.
|
public MutableNameGameObjectMatcher(@NotNull @NotNull java.lang.String name)
name
- the archetype name to match againstpublic boolean isMatching(@NotNull @NotNull GameObject<?,?,?> gameObject)
GameObjectMatcher
GameObject
.isMatching
in interface GameObjectMatcher
gameObject
- the GameObject
to matchtrue
if this matcher matches the given game object,
otherwise false
@NotNull public @NotNull java.lang.String getName()
public void setName(@NotNull @NotNull java.lang.String name)
name
- the archetype name to match against