org.axiondb
Interface RowCollection

All Known Implementing Classes:
RowCollections

public interface RowCollection

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

Method Summary
 boolean add(Row row)
          Ensures that this row collection contains the specified row.
 void clear()
          Removes all of the rows from this row collection.
 boolean contains(Row row)
          Returns true if this row collection contains the specified row.
 boolean isEmpty()
          Returns true if this row collection contains no rows.
 boolean remove(Row row)
          Removes a single instance of the specified row from this row collection, if it is present.
 RowIterator rowIterator()
          Returns an iterator over the rows in this row collection.
 int size()
          Returns the number of rows in this row collection.
 

Method Detail

add

boolean add(Row row)
            throws AxionException
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.
AxionException

clear

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

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

contains

boolean contains(Row row)
                 throws AxionException
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
Throws:
AxionException

isEmpty

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

Returns:
true if this row collection contains no rows

rowIterator

RowIterator rowIterator()
                        throws AxionException
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
Throws:
AxionException

remove

boolean remove(Row row)
               throws AxionException
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.
AxionException

size

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

Returns:
the number of rows in this row collection