goldman.collection.positional
Class Array.Marker
java.lang.Object
goldman.collection.AbstractCollection.AbstractLocator<E>
goldman.collection.positional.Array.BasicMarker
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>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Array.Marker
public Array.Marker(int p)
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