goldman.collection.positional
Class Array.Marker

java.lang.Object
  extended by goldman.collection.AbstractCollection.AbstractLocator<E>
      extended by goldman.collection.positional.Array.BasicMarker
          extended by goldman.collection.positional.Array.Marker
All Implemented Interfaces:
Locator<E>, PositionalCollectionLocator<E>, Cloneable, Iterator<E>
Enclosing class:
Array<E>

public class Array.Marker
extends Array.BasicMarker
implements PositionalCollectionLocator<E>


Field Summary
 
Fields inherited from class goldman.collection.AbstractCollection.AbstractLocator
versionNumber
 
Constructor Summary
Array.Marker(int p)
           
 
Method Summary
 PositionalCollectionLocator<E> addAfter(E value)
          Adds value to the collection after the marker location
 int getCurrentPosition()
          Returns the position within the collection for this locator.
 
Methods inherited from class goldman.collection.positional.Array.BasicMarker
advance, get, hasNext, inCollection, remove, retreat
 
Methods inherited from class goldman.collection.AbstractCollection.AbstractLocator
checkValidity, ignoreConcurrentModifications, ignorePriorConcurrentModifications, next, updateVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface goldman.collection.Locator
advance, get, ignoreConcurrentModifications, ignorePriorConcurrentModifications, inCollection, retreat
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

Array.Marker

public Array.Marker(int p)
Method Detail

getCurrentPosition

public int getCurrentPosition()
                       throws ConcurrentModificationException
Description copied from interface: PositionalCollectionLocator
Returns the position within the collection for this locator.

Specified by:
getCurrentPosition in interface PositionalCollectionLocator<E>
Returns:
the user position of the marker.
Throws:
ConcurrentModificationException

addAfter

public PositionalCollectionLocator<E> addAfter(E value)
                                        throws ConcurrentModificationException
Adds value to the collection after the marker location

Specified by:
addAfter in interface PositionalCollectionLocator<E>
Parameters:
value - the element to be added
Returns:
null
Throws:
RuntimeException - the marker is at AFT
ConcurrentModificationException