com.objectwave.persist.file
Class RecordIterator

java.lang.Object
  |
  +--com.objectwave.persist.file.RecordIterator
All Implemented Interfaces:
java.util.Iterator

public class RecordIterator
extends java.lang.Object
implements java.util.Iterator

A Record is an abstraction of a 'row' in the virtual table.

Version:
$Id: RecordIterator.java,v 2.1 2002/03/23 13:42:10 dave_hoag Exp $
Author:
Dave Hoag

Nested Class Summary
static class RecordIterator.Test
          Unit tests.
 
Constructor Summary
RecordIterator(java.io.RandomAccessFile file)
          Every iterator needs the file upon which to iterate.
 
Method Summary
 java.io.RandomAccessFile getSourceFile()
          The file upon which this class is iterating.
 boolean hasNext()
          Returns true if the iteration has more elements.
 java.lang.Object next()
          Return the next element in the iteration.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordIterator

public RecordIterator(java.io.RandomAccessFile file)
               throws java.io.IOException
Every iterator needs the file upon which to iterate.

Parameters:
file - Description of Parameter
Throws:
java.io.IOException - Description of Exception
Method Detail

getSourceFile

public java.io.RandomAccessFile getSourceFile()
The file upon which this class is iterating.

Returns:
The SourceFile value

hasNext

public boolean hasNext()
Returns true if the iteration has more elements. From the iterator interface.

Specified by:
hasNext in interface java.util.Iterator
Returns:
boolean

next

public java.lang.Object next()
Return the next element in the iteration. This element will be a 'record' in the database.

Specified by:
next in interface java.util.Iterator
Returns:
Description of the Returned Value

remove

public void remove()
Specified by:
remove in interface java.util.Iterator