public class Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static Double |
average(Collection<Double> values,
AverageCalculationMode mode)
Calculate the average for the given set of data and given mode
|
static List<Integer> |
getDeviceIds(Collection<at.ac.ait.hbs.homer.core.common.model.DBDevice> devices) |
static List<Integer> |
getDeviceIds(at.ac.ait.hbs.homer.core.common.DataAccess dataAccess,
at.ac.ait.hbs.homer.core.common.enumerations.DeviceType deviceType,
int flatId) |
static List<Integer> |
getDeviceIds(at.ac.ait.hbs.homer.core.common.DataAccess dataAccess,
at.ac.ait.hbs.homer.core.common.enumerations.DeviceType deviceType,
int flatId,
int... excludedDeviceIds) |
static List<Integer> |
getDeviceIds(at.ac.ait.hbs.homer.core.common.DataAccess dataAccess,
at.ac.ait.hbs.homer.core.common.enumerations.DeviceType deviceType,
int flatId,
List<Integer> excludedDeviceIds) |
static List<Integer> |
getDeviceIds(int... devices) |
static List<Integer> |
getDeviceIds(List<at.ac.ait.hbs.homer.core.common.model.DBDevice> devices) |
static org.joda.time.DateTime |
getTimestampForPeriod(long duration,
TimeUnit timeUnit) |
static double |
mean(Collection<Double> values)
Calculate the mean for the given set of data
|
static double |
median(Collection<Double> values)
Calculate the median for the given set of data
|
static Double |
round(Double d)
Round to 2 decimal places
|
static Double |
round(Double d,
int decimalPlace)
Round to certain number of decimals
|
static Float |
round(Float f)
Round to 2 decimal places
|
static Float |
round(Float f,
int decimalPlace)
Round to certain number of decimals
|
public static final List<Integer> getDeviceIds(at.ac.ait.hbs.homer.core.common.DataAccess dataAccess, at.ac.ait.hbs.homer.core.common.enumerations.DeviceType deviceType, int flatId)
public static final List<Integer> getDeviceIds(at.ac.ait.hbs.homer.core.common.DataAccess dataAccess, at.ac.ait.hbs.homer.core.common.enumerations.DeviceType deviceType, int flatId, List<Integer> excludedDeviceIds)
public static final List<Integer> getDeviceIds(at.ac.ait.hbs.homer.core.common.DataAccess dataAccess, at.ac.ait.hbs.homer.core.common.enumerations.DeviceType deviceType, int flatId, int... excludedDeviceIds)
public static final List<Integer> getDeviceIds(Collection<at.ac.ait.hbs.homer.core.common.model.DBDevice> devices)
public static final List<Integer> getDeviceIds(List<at.ac.ait.hbs.homer.core.common.model.DBDevice> devices)
public static final org.joda.time.DateTime getTimestampForPeriod(long duration,
TimeUnit timeUnit)
public static final Double average(Collection<Double> values, AverageCalculationMode mode)
values - mode - public static final double mean(Collection<Double> values)
values - public static final double median(Collection<Double> values)
values - public static Float round(Float f, int decimalPlace)
f - decimalPlace - Copyright © 2017. All rights reserved.