T
- the type of the result of processing one rowC
- the type of the result of processing a number of sub-rows under the same parentpublic interface ForestParentChildrenClosure<T,C>
Forest.foldUpwards(com.almworks.jira.structure.api.forest.raw.ForestParentChildrenClosure<T, C>)
.Modifier and Type | Method and Description |
---|---|
C |
combine(ForestIterationControl fold,
T value,
C carry)
Used to combine values returned by {#visitRow} calls to every sub-row of a single parent.
|
T |
visitRow(ForestIterationControl fold,
long row,
LongList children,
C carry)
Process an row using information about children.
|
@Nullable C combine(@NotNull ForestIterationControl fold, T value, @Nullable C carry)
fold
- fold controlvalue
- the value returned by visitRow()
carry
- the carry value returned by previous call to combine()
on a result of processing the successor row under the same parent row, or null
for the first call@Nullable T visitRow(@NotNull ForestIterationControl fold, long row, @NotNull LongList children, @Nullable C carry)
fold
- fold controlrow
- the row idchildren
- the sub-rows, or empty list if it's a leafcarry
- the combined carry value (result of calling combine(com.almworks.jira.structure.api.forest.raw.ForestIterationControl, T, C)
on every result of child processing, or null if (but not only if) there are no childrenCopyright © 2024 Tempo Software. All Rights Reserved.