Package net.sf.gridarta.model.match
Class MutableNameGameObjectMatcher
- java.lang.Object
-
- net.sf.gridarta.model.match.MutableNameGameObjectMatcher
-
- All Implemented Interfaces:
java.io.Serializable,GameObjectMatcher
public class MutableNameGameObjectMatcher extends java.lang.Object implements GameObjectMatcher
AnGameObjectMatcherthat simply matches a archetype name. This is probably the most basic and most simple implementation ofGameObjectMatcher.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MutableNameGameObjectMatcher(@NotNull java.lang.String name)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.StringgetName()Returns the archetype name matched by this matcher.booleanisMatching(@NotNull GameObject<?,?,?> gameObject)Matches aGameObject.voidsetName(@NotNull java.lang.String name)Sets the archetype name to match.
-
-
-
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
-
getName
@NotNull public @NotNull java.lang.String getName()
Returns the archetype name matched by this matcher.- Returns:
- the archetype name matched
-
setName
public void setName(@NotNull @NotNull java.lang.String name)Sets the archetype name to match.- Parameters:
name- the archetype name to match against
-
-