org.datamixer.collections
Class IteratorReference

java.lang.Object
  extended byorg.datamixer.collections.DatamixerIterator
      extended byorg.datamixer.collections.IteratorReference
All Implemented Interfaces:
DatamixerEventGenerator, java.util.Iterator

public class IteratorReference
extends DatamixerIterator


Field Summary
protected  DatamixerIterator reference_
          the referenced iterator
protected  boolean useCurrent_
          use iterator's current value if true
 
Fields inherited from class org.datamixer.collections.DatamixerIterator
collection_, debugEnabled_, done_, doneChecked_, doneListeners_, format_, formatPattern_, id_, infoEnabled_, initialized_, logger_, name_, nextListeners_, path_, repeat_, repeatSet_
 
Constructor Summary
IteratorReference()
           
IteratorReference(DatamixerIterator value)
           
 
Method Summary
protected  boolean doDone()
          Returns true if generation has finished.
protected  void doGenerate()
          Generate the next element in the collection.
protected  Value doGetCurrentValue()
          Returns the current value.
protected  void doInitialize()
          Initialization.
protected  void doReset()
          Resets the generator to an initial state.
 void fireDatamixerEvent(int event)
          Calls handleDatamixerEvent on listeners.
 DatamixerCollection getCollection()
          Returns this iterator's collection.
 int getDataType()
          Returns the datatype.
 java.text.Format getFormat(java.lang.String pattern)
          Returns an appropriate Format object.
 DatamixerIterator getReference()
           
 boolean getUseCurrent()
           
 void setReference(DatamixerIterator value)
           
 void setUseCurrent(boolean value)
           
 
Methods inherited from class org.datamixer.collections.DatamixerIterator
addDatamixerListener, doFireDatamixerEvent, generate, getContainer, getCurrent, getCurrentValue, getFormatPattern, getHasNext, getId, getListeners, getName, getNext, getNextValue, getPath, getRepeat, hasNext, initialize, next, remove, removeDatamixerListener, reset, setCollection, setContainer, setCurrentValue, setDataType, setFormatPattern, setId, setName, setRepeat, toString, updateCurrentValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reference_

protected DatamixerIterator reference_
the referenced iterator


useCurrent_

protected boolean useCurrent_
use iterator's current value if true

Constructor Detail

IteratorReference

public IteratorReference()

IteratorReference

public IteratorReference(DatamixerIterator value)
Method Detail

fireDatamixerEvent

public void fireDatamixerEvent(int event)
                        throws DatamixerException
Calls handleDatamixerEvent on listeners. If there are no listeners, then calls fireDatamixerEvent on referenced iterator.

Specified by:
fireDatamixerEvent in interface DatamixerEventGenerator
Overrides:
fireDatamixerEvent in class DatamixerIterator
Throws:
DatamixerException

doInitialize

protected void doInitialize()
                     throws DatamixerException
Initialization.

Overrides:
doInitialize in class DatamixerIterator
Throws:
DatamixerException

getCollection

public DatamixerCollection getCollection()
Returns this iterator's collection.

Overrides:
getCollection in class DatamixerIterator
Returns:
this iterator's collection.

getDataType

public int getDataType()
Returns the datatype. Datatypes are defined in java.sql.Types.

Overrides:
getDataType in class DatamixerIterator

doGetCurrentValue

protected Value doGetCurrentValue()
Returns the current value.

Specified by:
doGetCurrentValue in class DatamixerIterator
Returns:
the current value.

getFormat

public java.text.Format getFormat(java.lang.String pattern)
Returns an appropriate Format object.

Overrides:
getFormat in class DatamixerIterator

doDone

protected boolean doDone()
                  throws DatamixerException
Returns true if generation has finished.

Overrides:
doDone in class DatamixerIterator
Throws:
DatamixerException

doGenerate

protected void doGenerate()
                   throws DatamixerException
Generate the next element in the collection.

Overrides:
doGenerate in class DatamixerIterator
Throws:
DatamixerException

doReset

protected void doReset()
                throws DatamixerException
Resets the generator to an initial state.

Overrides:
doReset in class DatamixerIterator
Throws:
DatamixerException

getReference

public DatamixerIterator getReference()

setReference

public void setReference(DatamixerIterator value)

getUseCurrent

public boolean getUseCurrent()

setUseCurrent

public void setUseCurrent(boolean value)


Copyright © 2004-2006 datamixer.org. All Rights Reserved.