Package org.apache.sis.storage.aggregate
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
Base class for containers for a list of elements grouped by some attribute.
- Since:
- 1.3
- Version:
- 1.3
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGroup()
Creates a new group of objects associated to some attribute defined by subclasses. -
Method Summary
Modifier and TypeMethodDescription(package private) abstract String
createName
(Locale locale) Creates a name for this group.(package private) final String
getName
(StoreListeners listeners) Returns the name of this group.(package private) final GroupAggregate
prepareAggregate
(StoreListeners listeners) Prepares an initially empty aggregate.toString()
Returns a string representation for debugging purposes.
-
Field Details
-
name
The name of this group, ornull
if not yet computed.- See Also:
-
members
All members of this group. This list is populated by calls toGridSlice#addTo(List)
. Accesses to this list should be synchronized during the phase when this list is populated, because that part may be parallelized byCoverageAggregator#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
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, ornull
for the default.- Returns:
- a name which can be used as aggregation name.
-
getName
Returns the name of this group.- Parameters:
listeners
- listeners from which to get the locale, ornull
for the default.- Returns:
- a name which can be used as aggregation name.
-
prepareAggregate
Prepares an initially empty aggregate. One of theGroupAggregate.fillFoo(…)
methods must be invoked after this method.- Parameters:
listeners
- listeners of the parent resource, ornull
if none.- Returns:
- an initially empty aggregate.
-
toString
Returns a string representation for debugging purposes.
-