Class GroupBySample


final class GroupBySample extends Group<GroupByCRS<GroupByTransform>>
A container for a list of elements grouped by their sample dimensions.

Usage for coverage aggregation

GroupBySample contains an arbitrary number of GroupByCRS instances, which in turn contain an arbitrary number of GroupByTransform instances, which in turn contain an arbitrary number of GridSlice instances.
Since:
1.3
Version:
1.3
  • Field Details

  • Constructor Details

    • GroupBySample

      private GroupBySample(List<SampleDimension> ranges)
      Creates a new group of objects associated to the list of sample dimensions.
      Parameters:
      ranges - the sample dimensions of this group.
  • Method Details

    • createName

      final String createName(Locale locale)
      Returns a name for this group.
      Specified by:
      createName in class Group<GroupByCRS<GroupByTransform>>
      Parameters:
      locale - the locale for the name to return, or null for the default.
      Returns:
      a name which can be used as aggregation name.
    • getOrAdd

      static GroupBySample getOrAdd(List<GroupBySample> groups, List<SampleDimension> ranges)
      Returns the group of objects associated to the given ranges. This method takes a synchronization lock on the given list.
      Type Parameters:
      E - type of objects in groups.
      Parameters:
      groups - the list where to search for a group.
      ranges - sample dimensions of the desired group.
      Returns:
      group of objects associated to the given ranges (never null).
    • createComponents

      final void createComponents(GroupAggregate destination)
      Creates sub-aggregates for each member of this group and add them to the given aggregate.
      Parameters:
      destination - where to add sub-aggregates.