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 voidadd(int index, DataRow element)Adds a DataRow instance at the given index.DataRowadd(Object... items)Adds a new row of values to the collection.voidclear()Removes all the rows from the collection.DataRowget(int index)Gets the row at the given index.DataRowremove(int index)Removes the row at the given index.intsize()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:
clearin interfaceCollection<DataRow>- Specified by:
clearin interfaceList<DataRow>- Overrides:
clearin classAbstractList<DataRow>
-
size
public int size()
Gets the number of rows in the collection.- Specified by:
sizein interfaceCollection<DataRow>- Specified by:
sizein interfaceList<DataRow>- Specified by:
sizein classAbstractCollection<DataRow>
-
-