Class MoveableArrayList<E>

  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by org.eclipse.net4j.util.collection.MoveableArrayList<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, MoveableList<E>

public class MoveableArrayList<E>
extends ArrayList<E>
implements MoveableList<E>

A list with O(1) effort for random access.

Whenever possible EMF's BasicEList should be used in favour of this list implementation.

See Also:
Serialized Form

Field Summary
Fields inherited from class java.util.AbstractList
Constructor Summary
MoveableArrayList(int initialCapacity)
Method Summary
 E move(int targetIndex, int sourceIndex)
 void move(int newPosition, Object object)
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray

Constructor Detail


public MoveableArrayList(int initialCapacity)
Method Detail


public void move(int newPosition,
                 Object object)


public E move(int targetIndex,
              int sourceIndex)
Specified by:
move in interface MoveableList<E>

Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.