Package net.sf.gridarta.model.match
Class AttributeGameObjectMatcher
- java.lang.Object
-
- net.sf.gridarta.model.match.AttributeGameObjectMatcher
-
- All Implemented Interfaces:
java.io.Serializable,GameObjectMatcher
- Direct Known Subclasses:
IntAttributeGameObjectMatcher,StringAttributeGameObjectMatcher
public abstract class AttributeGameObjectMatcher extends java.lang.Object implements GameObjectMatcher
AnGameObjectMatcherthat matches a attribute value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeGameObjectMatcher(@NotNull Operation operation)Creates anAttributeGameObjectMatcher.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract intcompareValue(@NotNull GameObject<?,?,?> gameObject)Compares the attribute value of a given game object with the expected value.booleanisMatching(@NotNull GameObject<?,?,?> gameObject)Matches aGameObject.
-
-
-
Constructor Detail
-
AttributeGameObjectMatcher
protected AttributeGameObjectMatcher(@NotNull @NotNull Operation operation)Creates anAttributeGameObjectMatcher.- Parameters:
operation- theOperatorto use
-
-
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
-
compareValue
protected abstract int compareValue(@NotNull @NotNull GameObject<?,?,?> gameObject)Compares the attribute value of a given game object with the expected value.- Parameters:
gameObject- the game object- Returns:
- <0, 0, or >0 depending on the comparison result
-
-