net.sourceforge.combean.util
Class GCombinedNestedIterator

Similar to a nested iterator. The only difference is that the combined nested iterator returns pairs of the elements of the inner and the outer iteration as result of next(). If the inner or the outer iteration return Lists, these Lists can be flattened into a single list as result of next().

Field Summary
 boolean flattenResult
           
 
Constructor Summary
GCombinedNestedIterator(boolean flattenResult, Iterable outerIterable, Closure getInnerItForOuter)
            Constructor iteration shall be flattened into one List if they are Lists themselves
GCombinedNestedIterator(boolean flattenResult, Iterator itOuter, Closure getInnerItForOuter)
            Constructor iteration shall be flattened into one List if they are Lists themselves
 
Method Summary
Object next()
          
 

Constructor Detail

GCombinedNestedIterator

public GCombinedNestedIterator(boolean flattenResult, Iterable outerIterable, Closure getInnerItForOuter)
Constructor
params:
flattenResult flag whether the results of the inner and outer
iteration shall be flattened into one List if they are Lists themselves
params:
outerIterable Iterable for the outer iteration
params:
getInnerItForOuter Closure which returns the inner iterator


GCombinedNestedIterator

public GCombinedNestedIterator(boolean flattenResult, Iterator itOuter, Closure getInnerItForOuter)
Constructor
params:
flattenResult flag whether the results of the inner and outer
iteration shall be flattened into one List if they are Lists themselves
params:
itOuter Iterator for the outer iteration
params:
getInnerItForOuter Closure which returns the inner iterator


Method Detail

next

Object next()