|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.datamixer.collections.DatamixerIterator
| Field Summary | |
protected DatamixerCollection |
collection_
the associated collection |
protected boolean |
debugEnabled_
true if debugging is enabled |
protected boolean |
done_
true if done |
protected boolean |
doneChecked_
true if done() has been called for this generation |
protected java.util.List |
doneListeners_
done listeners |
protected java.text.Format |
format_
format |
protected java.lang.String |
formatPattern_
format pattern |
protected java.lang.String |
id_
this iterator's id |
protected boolean |
infoEnabled_
true if info is enabled |
protected boolean |
initialized_
true if initialized |
protected org.apache.log4j.Logger |
logger_
logger |
protected java.lang.String |
name_
value name |
protected java.util.List |
nextListeners_
next listeners |
protected java.lang.String |
path_
this iterator's path |
protected boolean |
repeat_
if true, reset when done |
protected boolean |
repeatSet_
true if repeat flag was set |
| Constructor Summary | |
DatamixerIterator()
|
|
| Method Summary | |
void |
addDatamixerListener(DatamixerListener listener,
int event,
int action)
Add listener. |
protected boolean |
doDone()
Returns false, always. |
protected void |
doFireDatamixerEvent(DatamixerEvent event)
Allows subclasses to initialize event. |
protected void |
doGenerate()
Generate the next element in the collection. |
protected abstract 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. |
void |
generate()
Generates the next value and sets it as the current value. |
DatamixerCollection |
getCollection()
Returns this iterator's collection. |
DatamixerIterator |
getContainer()
Returns this iterator's container. |
java.lang.Object |
getCurrent()
Returns the object most recently returned by next(). |
Value |
getCurrentValue()
Returns the value most recently returned by nextValue(). |
int |
getDataType()
Returns the datatype. |
java.text.Format |
getFormat(java.lang.String pattern)
Returns an appropriate Format object. |
java.lang.String |
getFormatPattern()
Returns the format pattern. |
boolean |
getHasNext()
Provides JavaBean access. |
java.lang.String |
getId()
Returns this iterator's id. |
protected java.util.List |
getListeners(int event)
Calls handleGenerateEvent on listeners. |
java.lang.String |
getName()
Returns the value name. |
java.lang.Object |
getNext()
Provides JavaBean access. |
Value |
getNextValue()
Generates the next value, sets it as the current value, and fires a next event. |
java.lang.String |
getPath()
Returns this iterator's path. |
boolean |
getRepeat()
Returns the repeat flag. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
void |
initialize()
Initialize this instance. |
java.lang.Object |
next()
Returns the next value. |
void |
remove()
|
void |
removeDatamixerListener(DatamixerListener listener,
int event,
int action)
Remove listener. |
void |
reset()
Resets the generator to an initial state. |
void |
setCollection(DatamixerCollection collection)
Sets this iterator's collection. |
void |
setContainer(DatamixerIterator container)
Sets this iterator's container. |
void |
setCurrentValue(Value value)
Returns the value most recently returned by nextValue(). |
void |
setDataType(int value)
Sets the data type. |
void |
setFormatPattern(java.lang.String value)
Sets the format pattern. |
void |
setId(java.lang.String id)
Sets this iterator's id. |
void |
setName(java.lang.String name)
Set the value name. |
void |
setRepeat(boolean value)
Sets the repeat flag. |
java.lang.String |
toString()
|
protected void |
updateCurrentValue()
Sets the current value from the derived class, and sets its name and format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String id_
protected java.lang.String path_
protected DatamixerCollection collection_
protected boolean repeat_
protected boolean repeatSet_
protected java.text.Format format_
protected java.lang.String formatPattern_
protected java.lang.String name_
protected boolean done_
protected boolean doneChecked_
protected boolean initialized_
protected java.util.List nextListeners_
protected java.util.List doneListeners_
protected boolean debugEnabled_
protected boolean infoEnabled_
protected org.apache.log4j.Logger logger_
| Constructor Detail |
public DatamixerIterator()
| Method Detail |
public boolean hasNext()
done event,
and returns false.
hasNext in interface java.util.Iterator
protected boolean doDone()
throws DatamixerException
false, always.
DatamixerExceptionpublic java.lang.Object next()
next in interface java.util.Iteratorpublic void remove()
remove in interface java.util.Iterator
public void addDatamixerListener(DatamixerListener listener,
int event,
int action)
listener.
addDatamixerListener in interface DatamixerEventGenerator
public void removeDatamixerListener(DatamixerListener listener,
int event,
int action)
listener. action is ignored.
removeDatamixerListener in interface DatamixerEventGeneratorprotected java.util.List getListeners(int event)
handleGenerateEvent on listeners.
public void fireDatamixerEvent(int event)
throws DatamixerException
handleDatamixerEvent on listeners.
fireDatamixerEvent in interface DatamixerEventGeneratorDatamixerException
protected void doFireDatamixerEvent(DatamixerEvent event)
throws DatamixerException
event.
DatamixerExceptionpublic java.lang.String toString()
public java.lang.String getId()
public void setId(java.lang.String id)
public java.lang.String getPath()
public DatamixerIterator getContainer()
public void setContainer(DatamixerIterator container)
public DatamixerCollection getCollection()
public void setCollection(DatamixerCollection collection)
collection - this iterator's collection.public int getDataType()
public void setDataType(int value)
public boolean getRepeat()
public void setRepeat(boolean value)
public java.lang.String getFormatPattern()
public void setFormatPattern(java.lang.String value)
public java.text.Format getFormat(java.lang.String pattern)
public java.lang.String getName()
public void setName(java.lang.String name)
public boolean getHasNext()
throws DatamixerException
DatamixerException
public java.lang.Object getNext()
throws DatamixerException
DatamixerException
public Value getNextValue()
throws DatamixerException
next event.
DatamixerExceptionpublic java.lang.Object getCurrent()
public Value getCurrentValue()
public void setCurrentValue(Value value)
protected abstract Value doGetCurrentValue()
public void initialize()
throws DatamixerException
DatamixerException
protected void doInitialize()
throws DatamixerException
DatamixerException
public void reset()
throws DatamixerException
DatamixerException
protected void doReset()
throws DatamixerException
DatamixerExceptionprotected void updateCurrentValue()
public void generate()
throws DatamixerException
DatamixerException
protected void doGenerate()
throws DatamixerException
DatamixerException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||