net.sf.farrago.namespace.mock
Class MedMockIterator

java.lang.Object
  extended by net.sf.farrago.namespace.mock.MedMockIterator
All Implemented Interfaces:
Iterator, RestartableIterator

public class MedMockIterator
extends Object
implements RestartableIterator

MedMockIterator generates mock data.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/namespace/mock/MedMockIterator.java#11 $
Author:
John V. Sichi

Field Summary
private  long nRows
           
private  long nRowsInit
           
private  Object obj
           
 
Constructor Summary
MedMockIterator(Object obj, long nRows)
          Constructor.
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 void restart()
          Restarts this iterator, so that a subsequent call to next() returns the first element in the collection being iterated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

obj

private Object obj

nRows

private long nRows

nRowsInit

private long nRowsInit
Constructor Detail

MedMockIterator

public MedMockIterator(Object obj,
                       long nRows)
Constructor.

Parameters:
obj - the single object which is returned over and over
nRows - number of rows to generate
Method Detail

next

public Object next()
Specified by:
next in interface Iterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

restart

public void restart()
Description copied from interface: RestartableIterator
Restarts this iterator, so that a subsequent call to next() returns the first element in the collection being iterated.

Specified by:
restart in interface RestartableIterator