public class MeasurableParameter<Value> extends SimpleDescribedEntity implements Parameter<Value>, PullMeasure<Value>, PushMeasure<Value>
MeasurableParameter aims at being usable both as a
Parameter and a Measure. This way, one can store it both in a
ParameterManager and a MeasureManager. You can directly
instantiate a fully featured MeasurableParameter with
MeasurableParameter() or wrap an existing Parameter with
MeasurableParameter(Parameter).| Constructor and Description |
|---|
MeasurableParameter()
Create an autonomous
MeasurableParameter. |
MeasurableParameter(Parameter<Value> parameter)
Create a
MeasurableParameter based on an existing
Parameter. |
| Modifier and Type | Method and Description |
|---|---|
Value |
get() |
void |
register(MeasureListener<Value> listener)
|
void |
set(Value value) |
void |
unregister(MeasureListener<Value> listener)
Unregister a
MeasureListener registered with
PushMeasure.register(MeasureListener) to stop receiving the notifications of
the PushMeasure. |
getDescription, getName, setDescription, setName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getNamepublic MeasurableParameter()
MeasurableParameter.public MeasurableParameter(Parameter<Value> parameter)
MeasurableParameter based on an existing
Parameter. The Parameter provided is wrapped by this
MeasurableParameter, so any modification made to the
Parameter is applied to this MeasurableParameter too, and
vice-versa.Value of the original
Parameter changes the Value of the
MeasurableParameter wrapping it, no notification is sent by the
MeasurableParameter to the MeasureListeners registered
through register(MeasureListener). These notifications only
occur when the MeasurableParameter itself is used to change the
Parameter's Value.parameter - the Parameter to wrap in this
MeasurableParameterpublic void set(Value value)
public Value get()
public void register(MeasureListener<Value> listener)
PushMeasureregister in interface PushMeasure<Value>listener - the MeasureListener to registerpublic void unregister(MeasureListener<Value> listener)
PushMeasureMeasureListener registered with
PushMeasure.register(MeasureListener) to stop receiving the notifications of
the PushMeasure.unregister in interface PushMeasure<Value>listener - the MeasureListener to unregisterCopyright © 2015. All rights reserved.