|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.tools.CmsIdentifiableObjectContainer
public class 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)
id
- the object identifieridObject
- the object add to the containerList.add(Object)
public void addIdentifiableObject(java.lang.String id, java.lang.Object idObject, float position)
Shifts the object currently at that position (if any) and any subsequent objects to the right (adds one to their indices).
id
- the object identifieridObject
- the object add to the containerposition
- the insertion pointList.add(int, Object)
public void clear()
public java.util.List elementList()
Object
s.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.
id
- the id of the object
null
Map.get(Object)
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 |