|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.workplace.tools.CmsIdentifiableObjectContainer<T>
T - the type of objectspublic class CmsIdentifiableObjectContainer<T>
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,
T idObject)
Appends the specified object to the end of this container. |
void |
addIdentifiableObject(java.lang.String id,
T idObject,
float position)
Inserts the specified object at the specified position in this container. |
void |
clear()
Resets the container. |
java.util.List<T> |
elementList()
Returns the list of objects. |
T |
getObject(java.lang.String id)
Returns the object with the given id. |
java.util.List<T> |
getObjectList(java.lang.String id)
Returns the list of objects 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 ordering| Method Detail |
|---|
public void addIdentifiableObject(java.lang.String id,
T idObject)
id - the object identifieridObject - the object add to the containerList.add(Object)
public void addIdentifiableObject(java.lang.String id,
T 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<T> elementList()
Objects.public T 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
nullMap.get(Object)public java.util.List<T> getObjectList(java.lang.String id)
id - the object id
nullpublic 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 | |||||||