Combine two stats into a new stat
Combine two stats into a new stat
the other stat to add
Add another stat to this stat.
Add another stat to this stat. Avoids allocating another object.
the other stat to add
Clears the stat to its original state when first initialized.
Clears the stat to its original state when first initialized. Necessary method used by the StatIterator.
Necessary method used by the StatIterator.
Necessary method used by the StatIterator. Indicates if the stat has any values or not
true if stat contains values
Compares the two stats for equivalence.
Compares the two stats for equivalence. We don't use standard 'equals' as it gets messy with mutable state and hash codes
other stat to compare
true if equals
Compute statistics based upon the given simple feature.
Compute statistics based upon the given simple feature. This method will be called for every SimpleFeature a query returns.
feature to evaluate
The simple feature type that this stat operates on
Returns a representation of the Stat to be serialized
Returns a representation of the Stat to be serialized
This function should return a representation (view) of the Stat to be serialized as JSON. Instances of Map can be used to represent JSON dictionaries or Seq for JSON arrays. A collection.SortedMap such as collection.immutable.ListMap is recommended if key order should be deterministic. Other types may be used but could require the creation and registration of custom serializers dependent on the JSON framework being utilized (currently Gson).
stat as a json serializable object
Tries to remove the given simple feature from the compiled statistics.
Tries to remove the given simple feature from the compiled statistics. Note: may not be possible to un-observe a feature, in which case this method will have no effect.
feature to un-evaluate
Non type-safe add - if stats are not the same type, will throw an exception
Non type-safe add - if stats are not the same type, will throw an exception
the other stat to add
Non type-safe add - if stats are not the same type, will throw an exception
Non type-safe add - if stats are not the same type, will throw an exception
the other stat to add
Returns a JSON representation of the Stat
Returns a JSON representation of the Stat
stat as a json string
Stats used by the StatsIterator to compute various statistics server-side for a given query.