|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rafa.NameRegistry
public class NameRegistry
Very simple registry of named objects.
Method Summary | |
---|---|
void |
clear()
Cleans the register up. |
Named |
get(java.lang.String name)
|
java.util.Collection<Named> |
getAll()
Retrieves all of the registered objects. |
java.util.Collection<Named> |
getAll(java.lang.Class<?> aClass)
Retrieves all the registered objects of a given class. |
java.util.Collection<java.lang.String> |
getAllNames(java.lang.Class<?> aClass)
Retrieves all of the names for registered objects of a given class. |
static NameRegistry |
getInstance()
This class is a singleton. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Updates the registry table with added/modified/removed names. |
Named |
remove(java.lang.String name)
Removes a name from the register. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static NameRegistry getInstance()
public java.util.Collection<Named> getAll()
public java.util.Collection<Named> getAll(java.lang.Class<?> aClass)
aClass
- the Class used as selector.
public java.util.Collection<java.lang.String> getAllNames(java.lang.Class<?> aClass)
aClass
- the Class used as selector.
public Named get(java.lang.String name)
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
-
ExistingNameException
- if a new/changing name is already registered.public Named remove(java.lang.String name)
name
- the removed name.
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |