jet.utils
Class Loop<C,RESULT>
java.lang.Object
jet.utils.Loop<C,RESULT>
- All Implemented Interfaces:
- java.lang.Runnable
public abstract class Loop<C,RESULT>
- extends java.lang.Object
- implements java.lang.Runnable
- Author:
- mmeiste10.1
Constructor Summary |
Loop()
Creates a new instance of ForEach |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
collection
protected java.util.Collection collection
iterator
protected java.util.Iterator<C> iterator
enumeration
protected java.util.Enumeration<C> enumeration
result
protected RESULT result
pos
protected long pos
wcontinue
private boolean wcontinue
listeners
private java.util.Collection<EventListener> listeners
Loop
public Loop()
- Creates a new instance of ForEach
setCollection
public void setCollection(java.util.Collection<C> c)
setArray
public void setArray(C[] a)
setIterator
public void setIterator(java.util.Iterator<C> i)
setEnumeration
public void setEnumeration(java.util.Enumeration<C> e)
iteration
public abstract void iteration(C object)
execute
public final RESULT execute(java.util.Iterator i)
execute
public final RESULT execute(java.util.Collection c)
execute
public final RESULT execute(C[] c)
execute
public final RESULT execute(java.util.Enumeration e)
execute
public final RESULT execute()
stop
public void stop()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
start
public void start()
getResult
public RESULT getResult()
addListener
public void addListener(EventListener l)
notifyAllListeners
private void notifyAllListeners(boolean success)