|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spagobi.tools.scheduler.utils.BIObjectParametersIterator
public class BIObjectParametersIterator
Constructor Summary | |
---|---|
BIObjectParametersIterator(java.util.List cartproduct)
Constructor. |
Method Summary | |
---|---|
boolean |
hasNext()
Returns true if there are any more elements in the Cartesian product to return. |
java.lang.Object |
next()
Returns another tuple not returned previously. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BIObjectParametersIterator(java.util.List cartproduct)
cartproduct
- a List of BIObjectParameter objects from which the
tuples' components are to be draw.Method Detail |
---|
public boolean hasNext()
public java.lang.Object next()
The iterator stores its state in the private member
currstate
-- an ArrayList of the iterators of the
individual Collections of any BIObjectParameter in the cartesian product.
In the start state, each iterator returns a single element. Afterwards, while iterator #1
has anything to return, we replace the first element of the previous
tuple to obtain a new tuple. Once iterator #1 runs out of elements we
replace it and advance iterator #2. We keep on advancing iterator #1
until it runs out of elements for the second time, reinitialize it
again, and advance iterator #2 once more. We repeat these operations
until iterator #2 runs out of elements and we start advancing
iterator #3, and so on, until all iterators run out of elements.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |