|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.tools.CmsIdentifiableObjectContainer
Default implementation of a named object container.
It can handle relative or absolute orderings and unique names.
Constructor Summary | |
CmsIdentifiableObjectContainer(boolean uniqueIds,
boolean relativeOrdered)
Default Constructor. |
Method Summary | |
void |
addIdentifiableObject(java.lang.String id,
java.lang.Object idObject)
Appends the specified object to the end of this container. |
void |
addIdentifiableObject(java.lang.String id,
java.lang.Object idObject,
float position)
Inserts the specified object at the specified position in this container. |
void |
clear()
Resets the container. |
java.util.List |
elementList()
Returns the list of objects. |
java.lang.Object |
getObject(java.lang.String id)
Returns the object with the given id. |
void |
removeObject(java.lang.String id)
Removes an object with the given id. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CmsIdentifiableObjectContainer(boolean uniqueIds, boolean relativeOrdered)
uniqueIds
- if the list show check for unique idsrelativeOrdered
- if the list show use relative ordering, instead of absolute orderingMethod Detail |
public void addIdentifiableObject(java.lang.String id, java.lang.Object idObject)
I_CmsIdentifiableObjectContainer
addIdentifiableObject
in interface I_CmsIdentifiableObjectContainer
id
- the object identifieridObject
- the object add to the containerI_CmsIdentifiableObjectContainer.addIdentifiableObject(java.lang.String, java.lang.Object)
public void addIdentifiableObject(java.lang.String id, java.lang.Object idObject, float position)
I_CmsIdentifiableObjectContainer
Shifts the object currently at that position (if any) and any subsequent objects to the right (adds one to their indices).
addIdentifiableObject
in interface I_CmsIdentifiableObjectContainer
id
- the object identifieridObject
- the object add to the containerposition
- the insertion pointI_CmsIdentifiableObjectContainer.addIdentifiableObject(java.lang.String, java.lang.Object, float)
public void clear()
I_CmsIdentifiableObjectContainer
clear
in interface I_CmsIdentifiableObjectContainer
I_CmsIdentifiableObjectContainer.clear()
public java.util.List elementList()
I_CmsIdentifiableObjectContainer
elementList
in interface I_CmsIdentifiableObjectContainer
Object
s.I_CmsIdentifiableObjectContainer.elementList()
public java.lang.Object getObject(java.lang.String id)
If uniqueIds
is set to false
an
containing a Object
with all the objects with the given id is returned.List
If the container no contains any object with the given id, null
is returned.
getObject
in interface I_CmsIdentifiableObjectContainer
id
- the id of the object
null
I_CmsIdentifiableObjectContainer.getObject(String)
public void removeObject(java.lang.String id)
if m_uniqueIds
is set, it will remove at most one object.
otherwise it will remove all elements with the given id.
id
- the id of the object to remove
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |