public class MeasurementController extends Object
There is always at most one measurement tool working.
AnalysisController
Constructor and Description |
---|
MeasurementController(Set<MeasurementTool> measurementTools)
Constructs a new
MeasurementController . |
Modifier and Type | Method and Description |
---|---|
boolean |
canMeasure(ReadOnlyMeasurementControllerBlackboardView blackboard)
Determines whether a
MeasurementTool can contribute to the
Blackboard . |
void |
measure(MeasurementControllerBlackboardView blackboard)
Instructs all available
MeasurementTools to measure all
items marked as “to be measured”. |
public MeasurementController(Set<MeasurementTool> measurementTools)
MeasurementController
.measurementTools
- The MeasurementTool
s to use. Must not be
null
and must not contain null
.public boolean canMeasure(ReadOnlyMeasurementControllerBlackboardView blackboard)
MeasurementTool
can contribute to the
Blackboard
.blackboard
- The blackboard. Must not be null
.MeasurementTool
can measure something which is marked as
'to be measured'. When true
is returned, this is no guarantee that
at least one new measurement result will be added.public void measure(MeasurementControllerBlackboardView blackboard)
MeasurementTools
to measure all
items marked as “to be measured”. MeasurementTools
may not
produce results for every item but will report results for all items they were able
to measure.
This method may only be called, when canMeasure(de.uka.ipd.sdq.beagle.core.measurement.ReadOnlyMeasurementControllerBlackboardView)
returned true
before and the Blackboard
wasn't changed between this call. Otherwise the
behaviour of this method is undefined.
blackboard
- The blackboard. Must not be null
.