public class Spells<S extends Spell>
extends java.lang.Object
implements java.lang.Iterable<S>
Constructor and Description |
---|
Spells() |
Modifier and Type | Method and Description |
---|---|
void |
add(S spell)
Add a spell.
|
S |
getSpell(int index)
Return one spell object by index.
|
@NotNull java.util.Iterator<S> |
iterator()
Return all known spell objects.
|
int |
size()
Return the number of existing spell objects.
|
void |
sort()
Sort the added spells after loading is finished.
|
public void sort()
public int size()
@NotNull public @NotNull java.util.Iterator<S> iterator()
public void add(@NotNull S spell)
spell
- the spell to addpublic S getSpell(int index)
index
- the spell index