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: ForestParentChildrenClosure
      Used to combine values returned by {#visitRow} calls to every sub-row of a single parent.
      Specified by:
      combine in interface ForestParentChildrenClosure<T,List<T>>
      Parameters:
      fold - fold control
      value - 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
      Returns:
      the combined carry value