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

A GameObjectMatcher that delegates to other. More...

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

Public Member Functions

void addArchObjectMatcher (@NotNull final GameObjectMatcher gameObjectMatcher)
 Adds an GameObjectMatcher. More...
 
boolean containsArchObjectMatcher (@NotNull final GameObjectMatcher gameObjectMatcher)
 Checks whether a certain GameObjectMatcher is contained in this matcher. More...
 
boolean isMatching (@NotNull final GameObject<?, ?, ?> gameObject)
 Matches an GameObject. More...
 
 MutableOrGameObjectMatcher (final boolean defaultState)
 Creates a new instance. More...
 
void removeAll ()
 Removes all GameObjectMatchers. More...
 
void removeArchObjectMatcher (@NotNull final GameObjectMatcher gameObjectMatcher)
 Removes an GameObjectMatcher. More...
 

Private Attributes

final boolean defaultState
 The default matching state when gameObjectMatchers is empty. More...
 
final Collection< GameObjectMatchergameObjectMatchers = new ArrayList<>()
 The GameObjectMatchers to OR. More...
 

Static Private Attributes

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

Detailed Description

A GameObjectMatcher that delegates to other.

GameObjectMatcher

s. If empty, isMatching(GameObject) returns

true

.

Author
Christian Hujer

Definition at line 33 of file MutableOrGameObjectMatcher.java.

Constructor & Destructor Documentation

◆ MutableOrGameObjectMatcher()

net.sf.gridarta.model.match.MutableOrGameObjectMatcher.MutableOrGameObjectMatcher ( final boolean  defaultState)

Creates a new instance.

Parameters
defaultStatethe default matching state when gameObjectMatchers is empty

Definition at line 58 of file MutableOrGameObjectMatcher.java.

References net.sf.gridarta.model.match.MutableOrGameObjectMatcher.defaultState.

Member Function Documentation

◆ addArchObjectMatcher()

void net.sf.gridarta.model.match.MutableOrGameObjectMatcher.addArchObjectMatcher ( @NotNull final GameObjectMatcher  gameObjectMatcher)

Adds an GameObjectMatcher.

The supplied

GameObjectMatcher

is only really added if it isn't already included, e.g. containsArchObjectMatcher(GameObjectMatcher) returns

false

.

Parameters
gameObjectMatcherthe matcher to add

Definition at line 81 of file MutableOrGameObjectMatcher.java.

References net.sf.gridarta.model.match.MutableOrGameObjectMatcher.containsArchObjectMatcher().

Referenced by net.sf.gridarta.model.match.SetEnabledAction.setSelected(), and net.sf.gridarta.model.match.ViewGameObjectMatcherManager.GameObjectMatcherToggleAction.setSelected().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ containsArchObjectMatcher()

boolean net.sf.gridarta.model.match.MutableOrGameObjectMatcher.containsArchObjectMatcher ( @NotNull final GameObjectMatcher  gameObjectMatcher)

Checks whether a certain GameObjectMatcher is contained in this matcher.

Parameters
gameObjectMatcherthe matcher to check
Returns
true
if the matcher is contained in this, otherwise
false

Definition at line 102 of file MutableOrGameObjectMatcher.java.

Referenced by net.sf.gridarta.model.match.MutableOrGameObjectMatcher.addArchObjectMatcher(), and net.sf.gridarta.model.match.SetEnabledAction.isSelected().

+ Here is the caller graph for this function:

◆ isMatching()

boolean net.sf.gridarta.model.match.MutableOrGameObjectMatcher.isMatching ( @NotNull final GameObject<?, ?, ?>  gameObject)

Matches an GameObject.

Parameters
gameObjectthe
GameObject
to match
Returns
true
if this matcher matches the given game object, otherwise
false

Implements net.sf.gridarta.model.match.GameObjectMatcher.

Definition at line 63 of file MutableOrGameObjectMatcher.java.

References net.sf.gridarta.model.match.MutableOrGameObjectMatcher.defaultState.

◆ removeAll()

void net.sf.gridarta.model.match.MutableOrGameObjectMatcher.removeAll ( )

Removes all GameObjectMatchers.

Definition at line 109 of file MutableOrGameObjectMatcher.java.

◆ removeArchObjectMatcher()

void net.sf.gridarta.model.match.MutableOrGameObjectMatcher.removeArchObjectMatcher ( @NotNull final GameObjectMatcher  gameObjectMatcher)

Removes an GameObjectMatcher.

Parameters
gameObjectMatcherthe matcher to remove

Definition at line 91 of file MutableOrGameObjectMatcher.java.

Referenced by net.sf.gridarta.model.match.SetEnabledAction.setSelected(), and net.sf.gridarta.model.match.ViewGameObjectMatcherManager.GameObjectMatcherToggleAction.setSelected().

+ Here is the caller graph for this function:

Member Data Documentation

◆ defaultState

final boolean net.sf.gridarta.model.match.MutableOrGameObjectMatcher.defaultState
private

◆ gameObjectMatchers

final Collection<GameObjectMatcher> net.sf.gridarta.model.match.MutableOrGameObjectMatcher.gameObjectMatchers = new ArrayList<>()
private

The GameObjectMatchers to OR.

Definition at line 51 of file MutableOrGameObjectMatcher.java.

◆ serialVersionUID

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

The serial version UID.

Definition at line 38 of file MutableOrGameObjectMatcher.java.


The documentation for this class was generated from the following file: