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 boolean
m_UndoEnabled
whether 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 boolean
add(DataContainer cont)
Adds the data container and sets the undo enabled flag accordingly.boolean
addAll(Collection<? extends DataContainer> c)
Adds all the data containers and sets their undo enabled flag accordingly.boolean
isUndoEnabled()
Returns whether undo is enabled.void
setUndoEnabled(boolean value)
Sets whether undo is enabled.-
Methods inherited from class java.util.ArrayList
add, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, 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
-
add
public boolean add(DataContainer cont)
Adds the data container and sets the undo enabled flag accordingly.- Specified by:
add
in interfaceCollection<DataContainer>
- Specified by:
add
in interfaceList<DataContainer>
- Overrides:
add
in 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:
addAll
in interfaceCollection<DataContainer>
- Specified by:
addAll
in interfaceList<DataContainer>
- Overrides:
addAll
in classArrayList<DataContainer>
- Parameters:
c
- the containers to add- Returns:
- true if collection modified
-
-