org.malai.mapping
Class ActiveArrayList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.malai.mapping.ActiveArrayList<E>
- Type Parameters:
E
- The type of the elements contained in the list.
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess, IActiveList<E>
public class ActiveArrayList<E>
- extends java.util.ArrayList<E>
- implements IActiveList<E>
Defines an active list that when an element is added/removed, then mapping registry
is then notified.
This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN
Malai is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
05/15/2010
- Since:
- 0.2
- Version:
- 0.2
- Author:
- Arnaud BLOUIN
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Method Summary |
boolean |
add(E element)
|
void |
add(int index,
E element)
|
boolean |
addAll(java.util.Collection<? extends E> collection)
|
boolean |
addAll(int index,
java.util.Collection<? extends E> collection)
|
void |
clear()
|
void |
move(int srcIndex,
int targetIndex)
Moves the object located at the position srcIndex to the location specified
by the targetIndex. |
E |
remove(int index)
|
boolean |
remove(java.lang.Object obj)
|
E |
set(int index,
E element)
|
Methods inherited from class java.util.ArrayList |
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, removeRange, 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 |
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, retainAll, size, subList, toArray, toArray |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
ActiveArrayList
public ActiveArrayList()
ArrayList.ArrayList()
ActiveArrayList
public ActiveArrayList(int initialCapacity)
ArrayList.ArrayList(int)
ActiveArrayList
public ActiveArrayList(java.util.Collection<E> coll)
ArrayList.ArrayList(Collection)
- Parameters:
coll
- The collection which elements will be added the the list.
move
public void move(int srcIndex,
int targetIndex)
- Description copied from interface:
IActiveList
- Moves the object located at the position srcIndex to the location specified
by the targetIndex.
- Specified by:
move
in interface IActiveList<E>
- Parameters:
srcIndex
- The position of the object to move.targetIndex
- The final position of the moved object.
add
public boolean add(E element)
- Specified by:
add
in interface java.util.Collection<E>
- Specified by:
add
in interface java.util.List<E>
- Overrides:
add
in class java.util.ArrayList<E>
add
public void add(int index,
E element)
- Specified by:
add
in interface java.util.List<E>
- Overrides:
add
in class java.util.ArrayList<E>
addAll
public boolean addAll(java.util.Collection<? extends E> collection)
- Specified by:
addAll
in interface java.util.Collection<E>
- Specified by:
addAll
in interface java.util.List<E>
- Overrides:
addAll
in class java.util.ArrayList<E>
addAll
public boolean addAll(int index,
java.util.Collection<? extends E> collection)
- Specified by:
addAll
in interface java.util.List<E>
- Overrides:
addAll
in class java.util.ArrayList<E>
clear
public void clear()
- Specified by:
clear
in interface java.util.Collection<E>
- Specified by:
clear
in interface java.util.List<E>
- Overrides:
clear
in class java.util.ArrayList<E>
remove
public E remove(int index)
- Specified by:
remove
in interface java.util.List<E>
- Overrides:
remove
in class java.util.ArrayList<E>
remove
public boolean remove(java.lang.Object obj)
- Specified by:
remove
in interface java.util.Collection<E>
- Specified by:
remove
in interface java.util.List<E>
- Overrides:
remove
in class java.util.ArrayList<E>
set
public E set(int index,
E element)
- Specified by:
set
in interface java.util.List<E>
- Overrides:
set
in class java.util.ArrayList<E>