Gridarta Editor
net.sf.gridarta.model.match.IntAttributeGameObjectMatcher Class Reference

A AttributeGameObjectMatcher that compares attributes values using "int" type. More...

+ Inheritance diagram for net.sf.gridarta.model.match.IntAttributeGameObjectMatcher:
+ Collaboration diagram for net.sf.gridarta.model.match.IntAttributeGameObjectMatcher:

Public Member Functions

 IntAttributeGameObjectMatcher (@NotNull final String name, @NotNull final Operation operation, @NotNull final String value, final boolean useDefArch) throws ParsingException
 Creates an. More...
 
- Public Member Functions inherited from net.sf.gridarta.model.match.AttributeGameObjectMatcher
boolean isMatching (@NotNull final GameObject<?, ?, ?> gameObject)
 Matches a GameObject. More...
 

Protected Member Functions

int compareValue (@NotNull final GameObject<?, ?, ?> gameObject)
 Compares the attribute value of a given game object with the expected value. More...
 
- Protected Member Functions inherited from net.sf.gridarta.model.match.AttributeGameObjectMatcher
 AttributeGameObjectMatcher (@NotNull final Operation operation)
 Creates an. More...
 

Private Attributes

final String name
 The attribute name to match. More...
 
final boolean useDefArch
 Whether to query the archetype as well. More...
 
final int value
 The attribute value to match. More...
 

Static Private Attributes

static final long serialVersionUID = 1L
 The serial version UID. More...
 

Detailed Description

A AttributeGameObjectMatcher that compares attributes values using "int" type.

Author
Andreas Kirschbaum

Definition at line 30 of file IntAttributeGameObjectMatcher.java.

Constructor & Destructor Documentation

◆ IntAttributeGameObjectMatcher()

net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.IntAttributeGameObjectMatcher ( @NotNull final String  name,
@NotNull final Operation  operation,
@NotNull final String  value,
final boolean  useDefArch 
) throws ParsingException

Creates an.

.

Parameters
namethe attribute name to match
operationthe
Operator
to use
valuethe attribute value to compare with
useDefArchwhether to query the archetype as well
Exceptions
ParsingExceptionif the value is not an integer

Definition at line 64 of file IntAttributeGameObjectMatcher.java.

References net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.name, net.sf.gridarta.model.match.AttributeGameObjectMatcher.operation, net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.useDefArch, and net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.value.

Member Function Documentation

◆ compareValue()

int net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.compareValue ( @NotNull final GameObject<?, ?, ?>  gameObject)
protected

Compares the attribute value of a given game object with the expected value.

Parameters
gameObjectthe game object
Returns
<0, 0, or >0 depending on the comparison result

Reimplemented from net.sf.gridarta.model.match.AttributeGameObjectMatcher.

Definition at line 76 of file IntAttributeGameObjectMatcher.java.

References net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.name, net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.useDefArch, and net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.value.

Member Data Documentation

◆ name

final String net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.name
private

◆ serialVersionUID

final long net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.serialVersionUID = 1L
staticprivate

The serial version UID.

Definition at line 35 of file IntAttributeGameObjectMatcher.java.

◆ useDefArch

final boolean net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.useDefArch
private

◆ value

final int net.sf.gridarta.model.match.IntAttributeGameObjectMatcher.value
private

The documentation for this class was generated from the following file:
net.sf.gridarta.model.match.AttributeGameObjectMatcher.AttributeGameObjectMatcher
AttributeGameObjectMatcher(@NotNull final Operation operation)
Creates an.
Definition: AttributeGameObjectMatcher.java:48