Class Group<E>

java.lang.Object
org.apache.sis.storage.aggregate.Group<E>
Type Parameters:
E - type of objects in this group.
Direct Known Subclasses:
CoverageAggregator, GroupByCRS, GroupBySample, GroupByTransform

abstract class Group<E> extends Object
Base class for containers for a list of elements grouped by some attribute.
Since:
1.3
Version:
1.3
  • Field Details

    • name

      private String name
      The name of this group, or null if not yet computed.
      See Also:
    • members

      final List<E> members
      All members of this group. This list is populated by calls to GridSlice#addTo(List). Accesses to this list should be synchronized during the phase when this list is populated, because that part may be parallelized by CoverageAggregator#addResources(Stream). No synchronization is needed after.
  • Constructor Details

    • Group

      Group()
      Creates a new group of objects associated to some attribute defined by subclasses.
  • Method Details

    • createName

      abstract String createName(Locale locale)
      Creates a name for this group. This is used as the resource name if an aggregated resource needs to be created.
      Parameters:
      locale - the locale for the name to return, or null for the default.
      Returns:
      a name which can be used as aggregation name.
    • getName

      final String getName(StoreListeners listeners)
      Returns the name of this group.
      Parameters:
      listeners - listeners from which to get the locale, or null for the default.
      Returns:
      a name which can be used as aggregation name.
    • prepareAggregate

      final GroupAggregate prepareAggregate(StoreListeners listeners)
      Prepares an initially empty aggregate. One of the GroupAggregate.fillFoo(…) methods must be invoked after this method.
      Parameters:
      listeners - listeners of the parent resource, or null if none.
      Returns:
      an initially empty aggregate.
    • toString

      public String toString()
      Returns a string representation for debugging purposes.
      Overrides:
      toString in class Object