/** * Retrieve the most current value of a measurement. * * @param measurementType The class of the requested Measurement * (e.g. VehicleSpeed.class) * @return An instance of the requested Measurement which may or may * not have a value. * @throws UnrecognizedMeasurementTypeException if passed a measurementType * that does not extend Measurement * @throws NoValueException if no value has yet been received for this * measurementType * @see BaseMeasurement */ public Measurement get( Class<? extends Measurement> measurementType) throws UnrecognizedMeasurementTypeException, NoValueException { return BaseMeasurement.getMeasurementFromMessage(measurementType, get(BaseMeasurement.getKeyForMeasurement(measurementType)).asSimpleMessage()); }