![]() |
Gridarta Editor
|
Common base class for spells and spell lists. More...
Public Member Functions | |
void | add (@NotNull final S spell) |
Add a spell. More... | |
S | getSpell (final int index) |
Return one spell object by index. More... | |
Iterator< S > | iterator () |
Return all known spell objects. More... | |
int | size () |
Return the number of existing spell objects. More... | |
void | sort () |
Sort the added spells after loading is finished. More... | |
Private Attributes | |
final List< S > | spells = new ArrayList<>() |
All defined spells. More... | |
Static Private Attributes | |
static final Comparator< Spell > | SPELL_COMPARATOR = (o1, o2) -> String.CASE_INSENSITIVE_ORDER.compare(o1.getName(), o2.getName()) |
A comparator to sort spells by name. More... | |
Common base class for spells and spell lists.
Definition at line 33 of file Spells.java.
void net.sf.gridarta.model.spells.Spells< S extends Spell >.add | ( | @NotNull final S | spell | ) |
S net.sf.gridarta.model.spells.Spells< S extends Spell >.getSpell | ( | final int | index | ) |
Return one spell object by index.
index | the spell index |
Definition at line 84 of file Spells.java.
Iterator<S> net.sf.gridarta.model.spells.Spells< S extends Spell >.iterator | ( | ) |
int net.sf.gridarta.model.spells.Spells< S extends Spell >.size | ( | ) |
Return the number of existing spell objects.
Definition at line 57 of file Spells.java.
void net.sf.gridarta.model.spells.Spells< S extends Spell >.sort | ( | ) |
Sort the added spells after loading is finished.
Definition at line 49 of file Spells.java.
|
staticprivate |
A comparator to sort spells by name.
Definition at line 44 of file Spells.java.
Referenced by net.sf.gridarta.model.spells.Spells< net.sf.gridarta.model.spells.GameObjectSpell< G, A, R > >.sort().
|
private |
All defined spells.
Definition at line 39 of file Spells.java.
Referenced by net.sf.gridarta.model.spells.Spells< net.sf.gridarta.model.spells.GameObjectSpell< G, A, R > >.add(), net.sf.gridarta.model.spells.Spells< net.sf.gridarta.model.spells.GameObjectSpell< G, A, R > >.getSpell(), net.sf.gridarta.model.spells.Spells< net.sf.gridarta.model.spells.GameObjectSpell< G, A, R > >.iterator(), net.sf.gridarta.model.spells.Spells< net.sf.gridarta.model.spells.GameObjectSpell< G, A, R > >.size(), and net.sf.gridarta.model.spells.Spells< net.sf.gridarta.model.spells.GameObjectSpell< G, A, R > >.sort().