Class IfGroupIndexRange

Object
AnchorBean<Grouper>
Grouper
IfGroupIndexRange

public class IfGroupIndexRange extends Grouper
When a IndexRangeNegative is passed as an argument, an InputGrouper is constructed that extracts elements from a Path.

See ExtractPathElementRange.extract(java.nio.file.Path, org.anchoranalysis.core.index.range.IndexRangeNegative) for how this occurs.

Otherwise, group is called to create a Optional<InputGrouper>.

Author:
Owen Feehan
  • Constructor Details

    • IfGroupIndexRange

      public IfGroupIndexRange()
  • Method Details

    • createInputGrouper

      public Optional<InputGrouper> createInputGrouper(Optional<IndexRangeNegative> groupIndexRange)
      Description copied from class: Grouper
      Creates an InputGrouper that can be used to derive a group-key from a particular input.
      Specified by:
      createInputGrouper in class Grouper
      Parameters:
      groupIndexRange - an index-range to use for grouping, by subsetting components from each input's identifier.
      Returns:
      the InputGrouper, if grouping is enabled. Otherwise Optional.empty().
    • getGroup

      public Grouper getGroup()
      Fallback to use when no group-index-range is specified.
    • setGroup

      public void setGroup(Grouper group)
      Fallback to use when no group-index-range is specified.