 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.archetypechooser;
22 import java.io.Serializable;
23 import java.util.Collection;
24 import java.util.Collections;
25 import java.util.HashSet;
27 import java.util.concurrent.CopyOnWriteArrayList;
31 import org.jetbrains.annotations.NotNull;
32 import org.jetbrains.annotations.Nullable;
70 private final Collection<ArchetypeChooserFolderListener<G, A, R>>
listeners =
new CopyOnWriteArrayList<>();
111 return Collections.unmodifiableSet(
archetypes);
138 throw new IllegalArgumentException(
"selected archetype " +
selectedArchetype.getAnimName() +
" is not part of the folder");
Base package of all Gridarta classes.
ArchetypeChooserFolder(@NotNull final String name)
Creates a new instance.
R selectedArchetype
The selected Archetype or.
Reflects a game object (object on a map).
A named folder within the ArchetypeChooserModel.
void removeArchetypeChooserFolderListener(@NotNull final ArchetypeChooserFolderListener< G, A, R > listener)
Removes a listener to be notified of changes.
GameObjects are the objects based on Archetypes found on maps.
final Collection< ArchetypeChooserFolderListener< G, A, R > > listeners
The registered listeners.
Interface for MapArchObjects.
boolean containsArchetype(@NotNull final R archetype)
Returns whether an Archetype is part of this folder.
final Set< R > archetypes
The Archetypes in this folder.
void addArchetype(@NotNull final R archetype)
Adds an Archetype to this folder.
void addArchetypeChooserFolderListener(@NotNull final ArchetypeChooserFolderListener< G, A, R > listener)
Adds a listener to be notified of changes.
static final long serialVersionUID
The serial version UID.
R getSelectedArchetype()
Returns the selected Archetype.
final String name
The folder name.
void setSelectedArchetype(@Nullable final R selectedArchetype)
Sets the selected Archetype.
String getName()
Returns the folder name.
Collection< R > getArchetypes()
Returns the Archetypes.