Gridarta Editor
net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject > Class Template Referenceabstract

This class manages NamedObjects, managing their tree as well as providing a method for showing a dialog for browsing their tree and selecting one from it. More...

+ Inheritance diagram for net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject >:
+ Collaboration diagram for net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject >:

Public Member Functions

boolean containsKey (@NotNull final String name)
 
get (@NotNull final String objectName)
 
String getName ()
 
NamedTreeNode< E > getTreeRoot ()
 
Iterator< E > iterator ()
 
int size ()
 
- Public Member Functions inherited from net.sf.gridarta.model.data.NamedObjects< E >
boolean containsKey ( @NotNull String name)
 Check whether an object is defined. More...
 
get ( @NotNull String objectName)
 Gets a AbstractNamedObject. More...
 
String getName ()
 Returns the tree name. More...
 
NamedTreeNode< E > getTreeRoot ()
 Get the object tree root. More...
 
Iterator< E > iterator ()
 NamedObjects are iterated in Unicode (=case sensitive ASCII) order. More...
 
int size ()
 Get the number of objects. More...
 

Protected Member Functions

 AbstractNamedObjects (final String name)
 Create a NamedObjects instance. More...
 
void put (@NotNull final E object) throws IllegalNamedObjectException
 Store a AbstractNamedObject. More...
 

Private Attributes

final String name
 The localized name of the object type, e.g. More...
 
final Map< String, E > objectMap = new HashMap<>()
 The objects that are mapped. More...
 
final NamedTreeNode< E > treeRoot = new NamedTreeNode<>()
 The tree of defined objects. More...
 

Static Private Attributes

static final long serialVersionUID = 1L
 The serial version UID. More...
 

Detailed Description

This class manages NamedObjects, managing their tree as well as providing a method for showing a dialog for browsing their tree and selecting one from it.

NamedObjects are iterated in Unicode (=ASCII) order.

Author
Michael Toennies
Christian Hujer

Definition at line 36 of file AbstractNamedObjects.java.

Constructor & Destructor Documentation

◆ AbstractNamedObjects()

Create a NamedObjects instance.

Parameters
namethe localized name of the object type, e.g. used in dialogs

Definition at line 66 of file AbstractNamedObjects.java.

Member Function Documentation

◆ containsKey()

boolean net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject >.containsKey ( @NotNull final String  name)

Definition at line 104 of file AbstractNamedObjects.java.

Referenced by net.sf.gridarta.model.anim.AbstractAnimationObjects.addAnimationObject().

+ Here is the caller graph for this function:

◆ get()

E net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject >.get ( @NotNull final String  objectName)

Definition at line 99 of file AbstractNamedObjects.java.

◆ getName()

Definition at line 78 of file AbstractNamedObjects.java.

Referenced by net.sf.gridarta.model.data.AbstractNamedObjects< FaceObject >.put().

+ Here is the caller graph for this function:

◆ getTreeRoot()

Definition at line 72 of file AbstractNamedObjects.java.

◆ iterator()

Iterator<E> net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject >.iterator ( )

Definition at line 109 of file AbstractNamedObjects.java.

Referenced by net.sf.gridarta.model.data.AbstractNamedObjects< FaceObject >.iterator().

+ Here is the caller graph for this function:

◆ put()

void net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject >.put ( @NotNull final E  object) throws IllegalNamedObjectException
protected

Store a AbstractNamedObject.

Parameters
objectAbstractNamedObject to store
Exceptions
IllegalNamedObjectExceptionif the named object cannot be added

Definition at line 87 of file AbstractNamedObjects.java.

Referenced by net.sf.gridarta.model.anim.AbstractAnimationObjects.addAnimationObject(), and net.sf.gridarta.model.face.AbstractFaceObjects.addFaceObject().

+ Here is the caller graph for this function:

◆ size()

Member Data Documentation

◆ name

◆ objectMap

final Map<String, E> net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject >.objectMap = new HashMap<>()
private

The objects that are mapped.

Definition at line 53 of file AbstractNamedObjects.java.

◆ serialVersionUID

final long net.sf.gridarta.model.data.AbstractNamedObjects< E extends NamedObject >.serialVersionUID = 1L
staticprivate

The serial version UID.

Definition at line 41 of file AbstractNamedObjects.java.

◆ treeRoot

The tree of defined objects.

Definition at line 60 of file AbstractNamedObjects.java.

Referenced by net.sf.gridarta.model.data.AbstractNamedObjects< FaceObject >.getTreeRoot().


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