Class AbstractListHavingProperties<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- psidev.psi.mi.jami.utils.collection.AbstractListHavingProperties<T>
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,RandomAccess
- Direct Known Subclasses:
AbstractFeature.FeatureIdentifierList,AbstractXmlBinaryInteractionEvidence.ExperimentalBinaryInteractionXrefList
public abstract class AbstractListHavingProperties<T> extends ArrayList<T>
Abstract list which is updating some properties when adding/removing elements.- Since:
11/02/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description AbstractListHavingProperties()Constructor for AbstractListHavingProperties.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadd(int i, T t)booleanadd(T object)booleanaddAll(int i, Collection<? extends T> ts)booleanaddAll(Collection<? extends T> ts)booleanaddAllOnly(int i, Collection<? extends T> ts)addAllOnlybooleanaddAllOnly(Collection<? extends T> ts)addAllOnlyvoidaddOnly(int i, T object)addOnlybooleanaddOnly(T object)addOnlyvoidclear()voidclearOnly()clearOnlyprotected abstract voidclearProperties()clearPropertiesIterator<T>iterator()ListIterator<T>listIterator()ListIterator<T>listIterator(int index)protected abstract voidprocessAddedObjectEvent(T added)processAddedObjectEventprotected abstract voidprocessRemovedObjectEvent(T removed)processRemovedObjectEventTremove(int i)booleanremove(Object o)booleanremoveAll(Collection<?> objects)booleanremoveAllOnly(Collection<?> objects)removeAllOnlyTremoveOnly(int i)removeOnlybooleanremoveOnly(Object o)removeOnlyprotected voidremoveRange(int i, int i2)protected voidremoveRangeOnly(int i, int i2)removeRangeOnlybooleanretainAll(Collection<?> objects)booleanretainAllOnly(Collection<?> objects)retainAllOnlyTset(int i, T t)TsetOnly(int i, T t)setOnly-
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, lastIndexOf, removeIf, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Method Detail
-
add
public boolean add(T object)
-
processAddedObjectEvent
protected abstract void processAddedObjectEvent(T added)
processAddedObjectEvent
- Parameters:
added- a T object.
-
remove
public boolean remove(Object o)
-
processRemovedObjectEvent
protected abstract void processRemovedObjectEvent(T removed)
processRemovedObjectEvent
- Parameters:
removed- a T object.
-
clear
public void clear()
-
clearProperties
protected abstract void clearProperties()
clearProperties
-
add
public void add(int i, T t)
-
remove
public T remove(int i)
-
retainAll
public boolean retainAll(Collection<?> objects)
-
removeAll
public boolean removeAll(Collection<?> objects)
-
removeRange
protected void removeRange(int i, int i2)- Overrides:
removeRangein classArrayList<T>
-
addAll
public boolean addAll(int i, Collection<? extends T> ts)
-
addAll
public boolean addAll(Collection<? extends T> ts)
-
addOnly
public void addOnly(int i, T object)addOnly
- Parameters:
i- a int.object- a T object.
-
addOnly
public boolean addOnly(T object)
addOnly
- Parameters:
object- a T object.- Returns:
- a boolean.
-
removeOnly
public boolean removeOnly(Object o)
removeOnly
- Parameters:
o- aObjectobject.- Returns:
- a boolean.
-
clearOnly
public void clearOnly()
clearOnly
-
retainAllOnly
public boolean retainAllOnly(Collection<?> objects)
retainAllOnly
- Parameters:
objects- aCollectionobject.- Returns:
- a boolean.
-
removeOnly
public T removeOnly(int i)
removeOnly
- Parameters:
i- a int.- Returns:
- a T object.
-
removeAllOnly
public boolean removeAllOnly(Collection<?> objects)
removeAllOnly
- Parameters:
objects- aCollectionobject.- Returns:
- a boolean.
-
removeRangeOnly
protected void removeRangeOnly(int i, int i2)removeRangeOnly
- Parameters:
i- a int.i2- a int.
-
addAllOnly
public boolean addAllOnly(int i, Collection<? extends T> ts)addAllOnly
- Parameters:
i- a int.ts- aCollectionobject.- Returns:
- a boolean.
-
addAllOnly
public boolean addAllOnly(Collection<? extends T> ts)
addAllOnly
- Parameters:
ts- aCollectionobject.- Returns:
- a boolean.
-
setOnly
public T setOnly(int i, T t)
setOnly
- Parameters:
i- a int.t- a T object.- Returns:
- a T object.
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIteratorin interfaceList<T>- Overrides:
listIteratorin classArrayList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<T>- Overrides:
listIteratorin classArrayList<T>
-
-