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

Maintains GameObjectMatcher instances. More...

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

Public Member Functions

void addGameObjectMatcher (@NotNull final NamedGameObjectMatcher gameObjectMatcher)
 Adds a new GameObjectMatcher. More...
 
Collection< NamedGameObjectMatchergetFilters ()
 Return all known game object matchers that should be used as filters. More...
 
GameObjectMatcher getMatcher (@NotNull final String... ids)
 Returns a matcher by id; returns. More...
 
GameObjectMatcher getMatcherWarn (@NotNull final ErrorViewCollector errorViewCollector, @NotNull final String... ids)
 Returns a matcher by id; prints a warning if the matcher does not exist. More...
 
Iterator< NamedGameObjectMatcheriterator ()
 

Private Attributes

final Collection< NamedGameObjectMatchergameObjectMatchers = new ArrayList<>()
 List with game object matchers. More...
 
final Map< String, NamedGameObjectMatchergameObjectMatchersByIds = new HashMap<>()
 Map with game object object matchers and their IDs. More...
 

Static Private Attributes

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

Detailed Description

Maintains GameObjectMatcher instances.

Author
Christian Hujer
Andreas Kirschbaum

Definition at line 40 of file GameObjectMatchers.java.

Member Function Documentation

◆ addGameObjectMatcher()

void net.sf.gridarta.model.match.GameObjectMatchers.addGameObjectMatcher ( @NotNull final NamedGameObjectMatcher  gameObjectMatcher)

Adds a new GameObjectMatcher.

Parameters
gameObjectMatcherthe game object matcher to add

Definition at line 112 of file GameObjectMatchers.java.

Referenced by net.sf.gridarta.model.validation.ValidationUtils.newValidatorFactory(), and net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testEditType1().

+ Here is the caller graph for this function:

◆ getFilters()

Collection<NamedGameObjectMatcher> net.sf.gridarta.model.match.GameObjectMatchers.getFilters ( )

Return all known game object matchers that should be used as filters.

Returns
the filter game object matches

Definition at line 98 of file GameObjectMatchers.java.

◆ getMatcher()

GameObjectMatcher net.sf.gridarta.model.match.GameObjectMatchers.getMatcher ( @NotNull final String...  ids)

Returns a matcher by id; returns.

null

if the matcher does not exist.

Parameters
idsthe ids to find
Returns
the matcher, or
null
if no such matcher exists

Definition at line 68 of file GameObjectMatchers.java.

Referenced by net.sf.gridarta.model.validation.checks.ValidatorFactory< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createGameObjectMatcher(), and net.sf.gridarta.model.match.GameObjectMatchers.getMatcherWarn().

+ Here is the caller graph for this function:

◆ getMatcherWarn()

GameObjectMatcher net.sf.gridarta.model.match.GameObjectMatchers.getMatcherWarn ( @NotNull final ErrorViewCollector  errorViewCollector,
@NotNull final String...  ids 
)

Returns a matcher by id; prints a warning if the matcher does not exist.

Parameters
errorViewCollectorthe error view collector to use
idsthe ids to find
Returns
the matcher, or
null
if no such matcher exists

Definition at line 85 of file GameObjectMatchers.java.

References net.sf.gridarta.model.errorview.ErrorViewCategory.GAMEOBJECTMATCHERS_ENTRY_INVALID, and net.sf.gridarta.model.match.GameObjectMatchers.getMatcher().

+ Here is the call graph for this function:

◆ iterator()

Iterator<NamedGameObjectMatcher> net.sf.gridarta.model.match.GameObjectMatchers.iterator ( )

Definition at line 118 of file GameObjectMatchers.java.

Member Data Documentation

◆ gameObjectMatchers

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

List with game object matchers.

Definition at line 59 of file GameObjectMatchers.java.

◆ gameObjectMatchersByIds

final Map<String, NamedGameObjectMatcher> net.sf.gridarta.model.match.GameObjectMatchers.gameObjectMatchersByIds = new HashMap<>()
private

Map with game object object matchers and their IDs.

Definition at line 52 of file GameObjectMatchers.java.

◆ serialVersionUID

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

The serial version UID.

Definition at line 45 of file GameObjectMatchers.java.


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