Gridarta Editor
net.sf.gridarta.model.connectionview.Connections Class Reference

Utility class to parse "connected" fields in game objects. More...

+ Collaboration diagram for net.sf.gridarta.model.connectionview.Connections:

Static Public Member Functions

static int [] parseConnections (@NotNull final BaseObject<?, ?, ?, ?> gameObject)
 Extract the "connected" value(s) from a given game object. More...
 

Private Member Functions

 Connections ()
 Private constructor to prevent instantiation. More...
 

Static Private Attributes

static final Pattern PATTERN_VALUE_SEPARATOR = Pattern.compile(",\\s*")
 Pattern to split different values in "connected" field arguments. More...
 
static final Pattern PATTERN_VALUES = Pattern.compile("\\d+(, *\\d+)*")
 Pattern to match the arguments of "connected" fields. More...
 

Detailed Description

Utility class to parse "connected" fields in game objects.

Author
Andreas Kirschbaum

Definition at line 31 of file Connections.java.

Constructor & Destructor Documentation

◆ Connections()

net.sf.gridarta.model.connectionview.Connections.Connections ( )
private

Private constructor to prevent instantiation.

Definition at line 46 of file Connections.java.

Member Function Documentation

◆ parseConnections()

static int [] net.sf.gridarta.model.connectionview.Connections.parseConnections ( @NotNull final BaseObject<?, ?, ?, ?>  gameObject)
static

Extract the "connected" value(s) from a given game object.

Parameters
gameObjectthe game object to process
Returns
the connected values, or
null
if the game object does not contain a "connected" field

Definition at line 56 of file Connections.java.

Referenced by net.sf.gridarta.model.validation.checks.ConnectionChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.check(), and net.sf.gridarta.gui.panel.connectionview.ConnectionView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.scanGameObject().

+ Here is the caller graph for this function:

Member Data Documentation

◆ PATTERN_VALUE_SEPARATOR

final Pattern net.sf.gridarta.model.connectionview.Connections.PATTERN_VALUE_SEPARATOR = Pattern.compile(",\\s*")
staticprivate

Pattern to split different values in "connected" field arguments.

Definition at line 41 of file Connections.java.

◆ PATTERN_VALUES

final Pattern net.sf.gridarta.model.connectionview.Connections.PATTERN_VALUES = Pattern.compile("\\d+(, *\\d+)*")
staticprivate

Pattern to match the arguments of "connected" fields.

Definition at line 36 of file Connections.java.


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