org.eclipse.net4j.util.collection
Class MoveableArrayList<E>

java.lang.Object
  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.

Author:
Eike Stepper
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
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

MoveableArrayList

public MoveableArrayList(int initialCapacity)
Method Detail

move

public void move(int newPosition,
                 Object object)
Since:
3.0

move

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


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