Class DataContainerList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<DataContainer>
-
- adams.gui.tools.wekainvestigator.data.DataContainerList
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<DataContainer>,Collection<DataContainer>,List<DataContainer>,RandomAccess
public class DataContainerList extends ArrayList<DataContainer>
For managing the data containers.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_NoCleanUpwhether to suppress automatic cleanup.protected booleanm_UndoEnabledwhether undo is enabled.-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description DataContainerList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(DataContainer cont)Adds the data container and sets the undo enabled flag accordingly.booleanaddAll(Collection<? extends DataContainer> c)Adds all the data containers and sets their undo enabled flag accordingly.voidclear()booleanisNoCleanUp()Returns whether to suppress automatic clean ups.booleanisUndoEnabled()Returns whether undo is enabled.DataContainerremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanremoveIf(Predicate<? super DataContainer> filter)protected voidremoveRange(int fromIndex, int toIndex)DataContainerset(int index, DataContainer element)voidsetNoCleanUp(boolean value)Sets whether to suppress automatic clean ups.voidsetUndoEnabled(boolean value)Sets whether undo is enabled.-
Methods inherited from class java.util.ArrayList
add, addAll, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, replaceAll, retainAll, 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
-
setUndoEnabled
public void setUndoEnabled(boolean value)
Sets whether undo is enabled.- Parameters:
value- true if enabled
-
isUndoEnabled
public boolean isUndoEnabled()
Returns whether undo is enabled.- Returns:
- true if enabled
-
setNoCleanUp
public void setNoCleanUp(boolean value)
Sets whether to suppress automatic clean ups.- Parameters:
value- true if to suppress
-
isNoCleanUp
public boolean isNoCleanUp()
Returns whether to suppress automatic clean ups.- Returns:
- true if to suppress
-
add
public boolean add(DataContainer cont)
Adds the data container and sets the undo enabled flag accordingly.- Specified by:
addin interfaceCollection<DataContainer>- Specified by:
addin interfaceList<DataContainer>- Overrides:
addin classArrayList<DataContainer>- Parameters:
cont- the container to add- Returns:
- true if collection modified
-
addAll
public boolean addAll(Collection<? extends DataContainer> c)
Adds all the data containers and sets their undo enabled flag accordingly.- Specified by:
addAllin interfaceCollection<DataContainer>- Specified by:
addAllin interfaceList<DataContainer>- Overrides:
addAllin classArrayList<DataContainer>- Parameters:
c- the containers to add- Returns:
- true if collection modified
-
set
public DataContainer set(int index, DataContainer element)
- Specified by:
setin interfaceList<DataContainer>- Overrides:
setin classArrayList<DataContainer>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<DataContainer>- Specified by:
removein interfaceList<DataContainer>- Overrides:
removein classArrayList<DataContainer>
-
remove
public DataContainer remove(int index)
- Specified by:
removein interfaceList<DataContainer>- Overrides:
removein classArrayList<DataContainer>
-
removeRange
protected void removeRange(int fromIndex, int toIndex)- Overrides:
removeRangein classArrayList<DataContainer>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<DataContainer>- Specified by:
removeAllin interfaceList<DataContainer>- Overrides:
removeAllin classArrayList<DataContainer>
-
removeIf
public boolean removeIf(Predicate<? super DataContainer> filter)
- Specified by:
removeIfin interfaceCollection<DataContainer>- Overrides:
removeIfin classArrayList<DataContainer>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<DataContainer>- Specified by:
clearin interfaceList<DataContainer>- Overrides:
clearin classArrayList<DataContainer>
-
-