![]() |
Gridarta Editor
|
Contains a list of (typically wall-)arches which do autojoining. More...
Public Member Functions | |
AutojoinList (@NotNull final Iterable< List< R >> archetypes) throws IllegalAutojoinListException | |
Creates a new instance. More... | |
int | getAlternativeIndex (@NotNull final R archetype) |
Returns the index of an Archetype if it is an alternative archetype for any direction. More... | |
R | getArchetype (final int index) |
Iterable< R > | getArchetypes (final int index) |
Returns all archetypes for an index. More... | |
int | getIndex (@NotNull final R archetype) |
Looks up the given node in the archetype array of this class. More... | |
boolean | isMainIndex (@NotNull final R archetype) |
Returns the index of an Archetype if it is a main archetype for any direction. More... | |
Static Public Attributes | |
static final int | EAST = 2 |
static final int | NORTH = 1 |
static final int | SIZE = 16 |
The number of archetypes in an autojoin list. More... | |
static final int | SOUTH = 4 |
static final int | WEST = 8 |
Static Private Member Functions | |
static< R extends Archetype<?, ?, R > List< R > | validate (@NotNull final Iterable< R > archetypeList) throws IllegalAutojoinListException |
Validates a list of archetypes: no entry must be. More... | |
Private Attributes | |
final List< List< R > > | archetypes |
Maps index to list of archetypes representing autojoin-able archetypes for this direction. More... | |
Static Private Attributes | |
static final Category | LOG = Logger.getLogger(AutojoinList.class) |
The Logger for printing log messages. More... | |
static final long | serialVersionUID = 1L |
The serial version UID. More... | |
Contains a list of (typically wall-)arches which do autojoining.
Definition at line 39 of file AutojoinList.java.
net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.AutojoinList | ( | @NotNull final Iterable< List< R >> | archetypes | ) | throws IllegalAutojoinListException |
Creates a new instance.
archetypes | the archetypes that form a set of join-able archetypes |
IllegalAutojoinListException | if the autojoin list cannot be created |
Definition at line 92 of file AutojoinList.java.
References net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.archetypes, net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.SIZE, and net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validate().
int net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getAlternativeIndex | ( | @NotNull final R | archetype | ) |
Returns the index of an Archetype if it is an alternative archetype for any direction.
archetype | the archetype to check |
Definition at line 177 of file AutojoinList.java.
References net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.archetypes, and net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.SIZE.
Referenced by net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinDelete(), and net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinInsert().
R net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getArchetype | ( | final int | index | ) |
Iterable<R> net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getArchetypes | ( | final int | index | ) |
Returns all archetypes for an index.
index | the index |
Definition at line 199 of file AutojoinList.java.
int net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getIndex | ( | @NotNull final R | archetype | ) |
Looks up the given node in the archetype array of this class.
archetype | the node to lookup |
Definition at line 144 of file AutojoinList.java.
References net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.archetypes, net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.LOG, and net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.SIZE.
boolean net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isMainIndex | ( | @NotNull final R | archetype | ) |
Returns the index of an Archetype if it is a main archetype for any direction.
archetype | the archetype to check |
Definition at line 161 of file AutojoinList.java.
References net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.archetypes, and net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.SIZE.
Referenced by net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinDelete(), and net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinInsert().
|
staticprivate |
Validates a list of archetypes: no entry must be.
, no duplicate entry must exist, at least one entry must exist.
archetypeList | the archetype list to validate |
IllegalAutojoinListException | if a validation error was detected |
Definition at line 118 of file AutojoinList.java.
|
private |
Maps index to list of archetypes representing autojoin-able archetypes for this direction.
The first archetype is the main archetype that can be converted into other archetypes. Following archetypes are alternative variants that are recognized but never converted. Examples for alternative archetypes are walls having windows.
The indices are interpreted in following order (0-15):
Definition at line 84 of file AutojoinList.java.
Referenced by net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.AutojoinList(), net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getAlternativeIndex(), net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getArchetype(), net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getArchetypes(), net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getIndex(), and net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isMainIndex().
|
static |
Definition at line 61 of file AutojoinList.java.
Referenced by net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinDelete(), and net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinInsert().
|
staticprivate |
The Logger for printing log messages.
Definition at line 50 of file AutojoinList.java.
|
static |
Definition at line 59 of file AutojoinList.java.
Referenced by net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinDelete(), and net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinInsert().
|
staticprivate |
The serial version UID.
Definition at line 44 of file AutojoinList.java.
|
static |
The number of archetypes in an autojoin list.
Definition at line 55 of file AutojoinList.java.
Referenced by net.sf.gridarta.model.autojoin.AutojoinLists< net.sf.gridarta.model.gameobject.TestGameObject, net.sf.gridarta.model.maparchobject.TestMapArchObject, net.sf.gridarta.model.archetype.TestArchetype >.addAutojoinList(), net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.AutojoinList(), net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getAlternativeIndex(), net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getIndex(), net.sf.gridarta.model.autojoin.AutojoinList< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isMainIndex(), and net.sf.gridarta.model.autojoin.AutojoinListsParser.loadList().
|
static |
Definition at line 63 of file AutojoinList.java.
Referenced by net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinDelete(), and net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinInsert().
|
static |
Definition at line 65 of file AutojoinList.java.
Referenced by net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinDelete(), and net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinInsert().