ch.bfh.algo.core.sequence
Class PositionArray<E,P extends GenericArrayPosition<E,P>>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<P>
ch.bfh.algo.core.sequence.PositionArray<E,P>
- All Implemented Interfaces:
- Iterable<P>, Collection<P>, List<P>
public class PositionArray<E,P extends GenericArrayPosition<E,P>>
- extends AbstractList<P>
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
PositionArray
public PositionArray(int size,
ArrayStrategy<P> factory)
get
public P get(int index)
throws IndexOutOfBoundsException
- Specified by:
get
in interface List<P extends GenericArrayPosition<E,P>>
- Specified by:
get
in class AbstractList<P extends GenericArrayPosition<E,P>>
- Throws:
IndexOutOfBoundsException
size
public int size()
- Specified by:
size
in interface Collection<P extends GenericArrayPosition<E,P>>
- Specified by:
size
in interface List<P extends GenericArrayPosition<E,P>>
- Specified by:
size
in class AbstractCollection<P extends GenericArrayPosition<E,P>>
insert
public void insert(int index,
P position)
throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
delete
public P delete(int index)
throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException