|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LoopCondition
The LoopCondition
interface provides a pseudo Collection
that returns increasing numbers through the collection's iterator(s)
until it is stopped. An instance of this class can be used in a VTL
#foreach loop to implement a classic for-loop with a boolean loop
condition.
Method Summary | |
---|---|
boolean |
isStopped()
Checks if the loop is stopped. |
void |
setLoopCondition(boolean condition)
Sets the loop condition. |
void |
stop()
Stops the loop which has the same effect as calling setLoopCondition(boolean) to false . |
Methods inherited from interface java.util.Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
void stop()
setLoopCondition(boolean)
to false
.
void setLoopCondition(boolean condition)
condition
- if true
another number may be returned by an Iterator
on this object, otherwise iterator().hasNext()
will
return false
.boolean isStopped()
true
if the loop has been stopped, false
otherwise.
|
Copyright 2003-2011, Frank Fock, All Rights Reserved. http://www.mibexplorer.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |