Package net.sf.gridarta.model.match
Class StringAttributeGameObjectMatcher
- java.lang.Object
-
- net.sf.gridarta.model.match.AttributeGameObjectMatcher
-
- net.sf.gridarta.model.match.StringAttributeGameObjectMatcher
-
- All Implemented Interfaces:
java.io.Serializable,GameObjectMatcher
public class StringAttributeGameObjectMatcher extends AttributeGameObjectMatcher
AAttributeGameObjectMatcherthat compares attributes values using "string" type.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StringAttributeGameObjectMatcher(@NotNull java.lang.String name, @NotNull Operation operation, @NotNull java.lang.String value, boolean useDefArch)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcompareValue(@NotNull GameObject<?,?,?> gameObject)Compares the attribute value of a given game object with the expected value.-
Methods inherited from class net.sf.gridarta.model.match.AttributeGameObjectMatcher
isMatching
-
-
-
-
Constructor Detail
-
StringAttributeGameObjectMatcher
public StringAttributeGameObjectMatcher(@NotNull @NotNull java.lang.String name, @NotNull @NotNull Operation operation, @NotNull @NotNull java.lang.String value, boolean useDefArch)Creates a new instance.- Parameters:
name- the attribute name to matchoperation- theOperatorto usevalue- the attribute value to compare withuseDefArch- whether to query the archetype as well
-
-
Method Detail
-
compareValue
protected int compareValue(@NotNull @NotNull GameObject<?,?,?> gameObject)Description copied from class:AttributeGameObjectMatcherCompares the attribute value of a given game object with the expected value.- Specified by:
compareValuein classAttributeGameObjectMatcher- Parameters:
gameObject- the game object- Returns:
- <0, 0, or >0 depending on the comparison result
-
-