com.senn.magic.collections
Class ChainableArrayList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by com.senn.magic.collections.ChainableArrayList<E>
All Implemented Interfaces:
ChainableList<E>, Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class ChainableArrayList<E>
extends ArrayList<E>
implements ChainableList<E>

ArrayList implementation of ChainableList

Since:
3.5
Author:
Bart Thierens
Last modification: 23/01/2011
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ChainableArrayList()
           
ChainableArrayList(Collection<? extends E> c)
           
ChainableArrayList(int initialCapacity)
           
 
Method Summary
 ChainableList<E> delete(int index)
           
 ChainableList<E> delete(Object o)
           
 ChainableList<E> deleteAll(Collection<?> c)
           
 ChainableList<E> empty()
           
 ChainableList<E> keepAll(Collection<?> c)
           
 ChainableList<E> put(E element)
           
 ChainableList<E> put(int index, E element)
           
 ChainableList<E> putAll(Collection<? extends E> c)
           
 ChainableList<E> putAll(int index, Collection<? extends E> c)
           
 ChainableList<E> replace(int index, E element)
           
 
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 com.senn.magic.collections.ChainableList
add, add, addAll, addAll, clear, remove, remove, removeAll, retainAll, set
 
Methods inherited from interface java.util.List
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size, subList, toArray, toArray
 

Constructor Detail

ChainableArrayList

public ChainableArrayList()

ChainableArrayList

public ChainableArrayList(int initialCapacity)

ChainableArrayList

public ChainableArrayList(Collection<? extends E> c)
Method Detail

delete

public ChainableList<E> delete(int index)
Specified by:
delete in interface ChainableList<E>
Returns:
See Also:
List.remove(int)

delete

public ChainableList<E> delete(Object o)
Specified by:
delete in interface ChainableList<E>
Returns:
See Also:
List.remove(Object)

deleteAll

public ChainableList<E> deleteAll(Collection<?> c)
Specified by:
deleteAll in interface ChainableList<E>
Returns:
See Also:
List.removeAll(Collection)

empty

public ChainableList<E> empty()
Specified by:
empty in interface ChainableList<E>
Returns:
See Also:
List.clear()

keepAll

public ChainableList<E> keepAll(Collection<?> c)
Specified by:
keepAll in interface ChainableList<E>
Returns:
See Also:
List.retainAll(Collection)

put

public ChainableList<E> put(E element)
Specified by:
put in interface ChainableList<E>
Returns:
See Also:
List.add(Object)

put

public ChainableList<E> put(int index,
                            E element)
Specified by:
put in interface ChainableList<E>
Returns:
See Also:
List.add(int, Object)

putAll

public ChainableList<E> putAll(Collection<? extends E> c)
Specified by:
putAll in interface ChainableList<E>
Returns:
See Also:
List.addAll(Collection)

putAll

public ChainableList<E> putAll(int index,
                               Collection<? extends E> c)
Specified by:
putAll in interface ChainableList<E>
Returns:
See Also:
List.addAll(int, Collection)

replace

public ChainableList<E> replace(int index,
                                E element)
Specified by:
replace in interface ChainableList<E>
Returns:
See Also:
List.set(int, Object)