|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.util.ArrayListChar.Iterator
ArrayListChar.Iterator provides a simple forware iterator with basic versioning. This versioning functionality will warn when the arraylist the iterator is associated with has been modified since the point in time when the iterator was instanciated. However this mechanism implemented by a simple counter is not sufficient for detecting shared-memory modifications done by concurrently executing threads. This is only possible to achieve by using synchronization constructs throughout the usage of the list/iterator pair, as the synchronization constructs are the only way of making sure that the independant working memory of each thread is flushed back into main memory.
| Field Summary | |
protected int |
frozen_stamp
modification stamp value frozen at instanciation time of the iterator |
protected int |
pos
current position of the iterator |
| Method Summary | |
boolean |
hasNext()
Tests whether there is a next element after the current element that the iterator points to. |
char |
next()
Returns the previous element from the iterator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int pos
protected final int frozen_stamp
| Method Detail |
public boolean hasNext()
ListModifiedException - thrown if a
modification of the array was detected.public char next()
ListModifiedException - thrown if a
modification of the array was detected.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||