org.axiondb

Interface RowCollection

public interface RowCollection

Version: $Revision: 1.2 $ $Date: 2005/12/22 09:02:30 $

Author: Ahimanikya Satapathy

Method Summary
booleanadd(Row row)
Ensures that this row collection contains the specified row.
voidclear()
Removes all of the rows from this row collection.
booleancontains(Row row)
Returns true if this row collection contains the specified row.
booleanisEmpty()
Returns true if this row collection contains no rows.
booleanremove(Row row)
Removes a single instance of the specified row from this row collection, if it is present.
RowIteratorrowIterator()
Returns an iterator over the rows in this row collection.
intsize()
Returns the number of rows in this row collection.

Method Detail

add

public boolean add(Row row)
Ensures that this row collection contains the specified row. Returns true if this row collection changed as a result of the call. (Returns false if this row collection does not permit duplicates and already contains the specified row.)

Parameters: row whose presence in this row collection is to be ensured.

Returns: true if this row collection changed as a result of the call

Throws: UnsupportedOperationException add is not supported by this row collection.

clear

public void clear()
Removes all of the rows from this row collection.

Throws: UnsupportedOperationException if the clear method is not supported by this row collection.

contains

public boolean contains(Row row)
Returns true if this row collection contains the specified row. More formally, returns true if and only if this row collection contains at least one row e such that (o==null ? e==null : row.equals(e)).

Parameters: row whose presence in this row collection is to be tested.

Returns: true if this row collection contains the specified row

isEmpty

public boolean isEmpty()
Returns true if this row collection contains no rows.

Returns: true if this row collection contains no rows

remove

public boolean remove(Row row)
Removes a single instance of the specified row from this row collection, if it is present.

Parameters: row to be removed from this row collection, if present.

Returns: true if this row collection changed as a result of the call

Throws: UnsupportedOperationException remove is not supported by this row collection.

rowIterator

public RowIterator rowIterator()
Returns an iterator over the rows in this row collection. There are no guarantees concerning the order in which the rows are returned (unless this row collection is an instance of some class that provides a guarantee).

Returns: an Iterator over the rows in this row collection

size

public int size()
Returns the number of rows in this row collection.

Returns: the number of rows in this row collection