org.flexiblepower.observation
T - The type of observation values that can be consumed.public interface ObservationConsumer<T>
ObservationConsumer is any object that is interested in observations of ObservationProviders. It
only contains the consume(ObservationProvider, Observation) method that will be called by
ObservationProviders when the consumer is registered with them.| Modifier and Type | Method and Description |
|---|---|
void |
consume(ObservationProvider<? extends T> source,
Observation<? extends T> observation)
This method should be call by any
ObservationProvider to which this consumer is bound. |
void consume(ObservationProvider<? extends T> source, Observation<? extends T> observation)
ObservationProvider to which this consumer is bound.source - The ObservationProvider that has sent the observation.observation - The Observation that has been sent.java.lang.NullPointerException - When the source or the observation is null.