public class AbstractSourceStatistic<T extends ChainedObserver> extends Object implements SourceStatistic<T>
SourceStatistic
that handles derived statistic
(de)registration.
This implementation exposes the currently registered statistics via the
#derived()
method. Concrete implementations of this class should
fire on the contents of this Iterable
to update the derived statistics.
Modifier and Type | Field and Description |
---|---|
protected Collection<T> |
derivedStatistics |
Constructor and Description |
---|
AbstractSourceStatistic() |
Modifier and Type | Method and Description |
---|---|
void |
addDerivedStatistic(T derived)
Register the given
Observer to be called by this SourceStatistic |
void |
removeDerivedStatistic(T derived)
Remove the given registered from this
SourceStatistic . |
protected final Collection<T extends ChainedObserver> derivedStatistics
public void addDerivedStatistic(T derived)
SourceStatistic
Observer
to be called by this SourceStatistic
addDerivedStatistic
in interface SourceStatistic<T extends ChainedObserver>
derived
- statistic to be registeredpublic void removeDerivedStatistic(T derived)
SourceStatistic
SourceStatistic
.removeDerivedStatistic
in interface SourceStatistic<T extends ChainedObserver>
derived
- statistic to be removedCopyright © 2017. All rights reserved.