Package com.bayesserver.data
Class DataRowCollection
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<DataRow>
-
- com.bayesserver.data.DataRowCollection
-
public final class DataRowCollection extends AbstractList<DataRow>
A collection of rows in a DataTable, a simple in-memory data store.
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, DataRow element)
Adds a DataRow instance at the given index.DataRow
add(Object... items)
Adds a new row of values to the collection.void
clear()
Removes all the rows from the collection.DataRow
get(int index)
Gets the row at the given index.DataRow
remove(int index)
Removes the row at the given index.int
size()
Gets the number of rows in the collection.-
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
add
public DataRow add(Object... items)
Adds a new row of values to the collection.- Parameters:
items
-
-
get
public DataRow get(int index)
Gets the row at the given index.
-
add
public void add(int index, DataRow element)
Adds a DataRow instance at the given index.
-
remove
public DataRow remove(int index)
Removes the row at the given index.
-
clear
public void clear()
Removes all the rows from the collection.- Specified by:
clear
in interfaceCollection<DataRow>
- Specified by:
clear
in interfaceList<DataRow>
- Overrides:
clear
in classAbstractList<DataRow>
-
size
public int size()
Gets the number of rows in the collection.- Specified by:
size
in interfaceCollection<DataRow>
- Specified by:
size
in interfaceList<DataRow>
- Specified by:
size
in classAbstractCollection<DataRow>
-
-