Package eu.planets_project.pp.plato.model.scales

Examples of eu.planets_project.pp.plato.model.scales.FloatScale


       
        Measurement measurement = new Measurement();
        MeasurableProperty property = new MeasurableProperty();
        String propertyName = m.getProperty().getName();
        property.setName(propertyName+":accumulated:average");
        FloatScale scale = new FloatScale();
        property.setScale(scale);
        measurement.setProperty(property);
       
        scale.setUnit(""+list.size());
   
        Double d = 0.0;
        for (Measurement entry : list) {
            INumericValue value = (INumericValue) entry.getValue();
            d+= value.value();
        }
        FloatValue average = (FloatValue) new FloatScale().createValue();
        average.setValue(d/list.size());
        measurement.setValue(average);
        return measurement;
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.model.scales.FloatScale

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.