ch.bfh.algo.core.sequence
Class ConcretePosition<E,P extends ConcretePosition<E,P>>
java.lang.Object
ch.bfh.algo.core.sequence.ConcretePosition<E,P>
- All Implemented Interfaces:
- GenericPosition<E,P>, Position<E>
- Direct Known Subclasses:
- GenericArrayPosition, GenericLinkedPosition
public class ConcretePosition<E,P extends ConcretePosition<E,P>>
- extends Object
- implements GenericPosition<E,P>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConcretePosition
public ConcretePosition()
locator
public ConcreteLocator<E,P> locator()
- Description copied from interface:
Position
- The
locator
method is used to
access the second level place holder (used only for complex data structures) such that ...
- Specified by:
locator
in interface GenericPosition<E,P extends ConcretePosition<E,P>>
- Specified by:
locator
in interface Position<E>
- Returns:
- the
Locator<E>
contained in the
Position
element
public E element()
- Description copied from interface:
Position
- The method
element()
returns the
element contained in the position.
- Specified by:
element
in interface Position<E>
- Returns:
- E the element contained in the
Position
setLocator
protected void setLocator(ConcreteLocator<E,P> locator)
container
protected GenericContainer<E,P> container()
setContainer
protected void setContainer(GenericContainer<E,P> container)
swap
protected void swap(P position0,
P position1)
replace
protected E replace(P position,
E element)