|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.util.Repository | +--org.objectweb.jac.util.OrderedRepository
This class defines a repository that provides order on the registered objects.
The order corresponds to the order the objects where registered into the repository.
Field Summary | |
Vector |
orderedNames
Vector for the ordered names. |
Vector |
orderedObjects
Vector for the ordered objects. |
protected static Repository |
repository
Store the sole instance of repository. |
Fields inherited from class org.objectweb.jac.util.Repository |
names, objects |
Constructor Summary | |
OrderedRepository()
|
Method Summary | |
static Repository |
get()
Get the sole repository instance for this class. |
String[] |
getNames()
Return the ordered names of the registered objects as an array. |
Object[] |
getObjects()
Return all the ordered registered objects as an array. |
String |
getPrintableString()
|
boolean |
register(String logicalName,
Object object)
Register a new object into the repository. |
void |
unregister(String logicalName)
Unregister a new JacObject into the repository. |
Methods inherited from class org.objectweb.jac.util.Repository |
dump, getName, getObject, init, isRegistered, unregisterObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Repository repository
NOTE: this field MUST be defined by all subclasses.
get()
public Vector orderedObjects
public Vector orderedNames
Constructor Detail |
public OrderedRepository()
Method Detail |
public static Repository get()
NOTE: this method MUST be defined by all subclasses.
public boolean register(String logicalName, Object object)
register
in class Repository
logicalName
- the key that allows to find the objectobject
- the object to register
unregister(String)
public void unregister(String logicalName)
unregister
in class Repository
logicalName
- the key that allows to find the objectregister(String,Object)
public Object[] getObjects()
Reverse operation is getNames()
.
getObjects
in class Repository
register(String,Object)
,
getNames()
public String[] getNames()
The given order is the registering order of the objects.
Reverse operation is getObjects()
.
getNames
in class Repository
register(String,Object)
,
getObjects()
public String getPrintableString()
getPrintableString
in class Repository
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |