Class ForestParentChildrenListClosure<T>
Object
ForestParentChildrenListClosure<T>
- All Implemented Interfaces:
ForestParentChildrenClosure<T,List<T>>
public abstract class ForestParentChildrenListClosure<T>
extends Object
implements ForestParentChildrenClosure<T,List<T>>
This is a utility implementation of ForestParentChildrenClosure that collects the results
of processing sub-rows into a list. This list is then passed to ForestParentChildrenClosure.visitRow(com.almworks.jira.structure.api.forest.raw.ForestIterationControl, long, com.almworks.integers.LongList, C) as a children carry.
Note that the list passed to visitRow() is in the reverse order, that is,
the first result is for the last child row.
-
Constructor Details
-
ForestParentChildrenListClosure
public ForestParentChildrenListClosure()
-
-
Method Details
-
combine
public List<T> combine(@NotNull ForestIterationControl fold, @NotNull T value, @Nullable List<T> carry) Description copied from interface:ForestParentChildrenClosureUsed to combine values returned by {#visitRow} calls to every sub-row of a single parent.- Specified by:
combinein interfaceForestParentChildrenClosure<T,List<T>> - Parameters:
fold- fold controlvalue- the value returned byvisitRow()carry- the carry value returned by previous call tocombine()on a result of processing the successor row under the same parent row, ornullfor the first call- Returns:
- the combined carry value
-