Package org.netxms.client.datacollection
Class DataFormatter
- java.lang.Object
-
- org.netxms.client.datacollection.DataFormatter
-
public class DataFormatter extends Object
Data formatter
-
-
Constructor Summary
Constructors Constructor Description DataFormatter(String formatString, DataType dataType)Create new data formatter with binary multipliers option set to off.DataFormatter(String formatString, DataType dataType, boolean useBinaryMultipliers)Create new data formatter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(String value)Format valuestatic StringroundDecimalValue(double value, double step, int maxPrecision)Get rounded value for char labels
-
-
-
Method Detail
-
format
public String format(String value)
Format value- Parameters:
value- The value- Returns:
- The format
-
roundDecimalValue
public static String roundDecimalValue(double value, double step, int maxPrecision)
Get rounded value for char labels- Parameters:
value- to roundstep- of labelmaxPrecision- desired precision- Returns:
- rounded value
-
-