|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A scaled-down double-ended queue interface with listeners. This is like java.util.List, except it includes constraints on values and listeners on state changes, and should be implemented in such a way that adds and removes on both ends are efficient. Many applications will use the ModifiableObjectDeque subinterface, which adds mutation methods.
This interface itself does not specify thread-safety semantics. The particular implementation or use in a larger interface should specify this. For example, standalone ObjectDeques may be fully synchronized and thread-safe. ObjectDeques related to AWT or Swing objects may require that all interaction be done on the AWT event thread.
Method Summary | |
void |
addObjectDequeListener(ObjectDequeListener listener)
Add an ObjectDequeListener. |
Object |
getBack()
Get the object in back of the deque. |
Object |
getFront()
Get the object in front of the deque. |
Object |
getNthObject(int n)
Get the indexed object. |
void |
removeObjectDequeListener(ObjectDequeListener listener)
Remove an ObjectDequeListener. |
Methods inherited from interface com.virtuosotechnologies.lib.container.ObjectContainer |
getConstraints, getContentsAsArray, getSize |
Method Detail |
public Object getFront()
public Object getBack()
public Object getNthObject(int n)
n
- index.
IndexOutOfBoundsException
- index out of boundspublic void addObjectDequeListener(ObjectDequeListener listener)
listener
- new listenerpublic void removeObjectDequeListener(ObjectDequeListener listener)
listener
- listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |