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 void
add(int i, T t)
boolean
add(T object)
boolean
addAll(int i, Collection<? extends T> ts)
boolean
addAll(Collection<? extends T> ts)
boolean
addAllOnly(int i, Collection<? extends T> ts)
addAllOnlyboolean
addAllOnly(Collection<? extends T> ts)
addAllOnlyvoid
addOnly(int i, T object)
addOnlyboolean
addOnly(T object)
addOnlyvoid
clear()
void
clearOnly()
clearOnlyprotected abstract void
clearProperties()
clearPropertiesIterator<T>
iterator()
ListIterator<T>
listIterator()
ListIterator<T>
listIterator(int index)
protected abstract void
processAddedObjectEvent(T added)
processAddedObjectEventprotected abstract void
processRemovedObjectEvent(T removed)
processRemovedObjectEventT
remove(int i)
boolean
remove(Object o)
boolean
removeAll(Collection<?> objects)
boolean
removeAllOnly(Collection<?> objects)
removeAllOnlyT
removeOnly(int i)
removeOnlyboolean
removeOnly(Object o)
removeOnlyprotected void
removeRange(int i, int i2)
protected void
removeRangeOnly(int i, int i2)
removeRangeOnlyboolean
retainAll(Collection<?> objects)
boolean
retainAllOnly(Collection<?> objects)
retainAllOnlyT
set(int i, T t)
T
setOnly(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:
removeRange
in 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
- aObject
object.- Returns:
- a boolean.
-
clearOnly
public void clearOnly()
clearOnly
-
retainAllOnly
public boolean retainAllOnly(Collection<?> objects)
retainAllOnly
- Parameters:
objects
- aCollection
object.- 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
- aCollection
object.- 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
- aCollection
object.- Returns:
- a boolean.
-
addAllOnly
public boolean addAllOnly(Collection<? extends T> ts)
addAllOnly
- Parameters:
ts
- aCollection
object.- 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:
listIterator
in interfaceList<T>
- Overrides:
listIterator
in classArrayList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIterator
in interfaceList<T>
- Overrides:
listIterator
in classArrayList<T>
-
-