Class MonitoringValueConverter.DoubleConverterWithFractionDigits
java.lang.Object
org.jppf.management.diagnostics.provider.MonitoringValueConverter.DoubleConverterWithFractionDigits
- All Implemented Interfaces:
MonitoringValueConverter,MonitoringValueConverter.DoubleConverter
- Enclosing interface:
- MonitoringValueConverter
public static class MonitoringValueConverter.DoubleConverterWithFractionDigits
extends Object
implements MonitoringValueConverter.DoubleConverter
Specialized converter to transform
double values to a string with a specified number of fraction digits.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jppf.management.diagnostics.provider.MonitoringValueConverter
MonitoringValueConverter.DoubleConverter, MonitoringValueConverter.DoubleConverterWithFractionDigits, MonitoringValueConverter.FloatConverter, MonitoringValueConverter.IntConverter, MonitoringValueConverter.LongConverter -
Constructor Summary
ConstructorsConstructorDescriptionDoubleConverterWithFractionDigits(int nbDecimals) Create a converter producing values with a specified number of fraction digits.DoubleConverterWithFractionDigits(int nbDecimals, String suffix) Create a converter producing values with a specified number of fraction digits and a specified suffix.DoubleConverterWithFractionDigits(int nbDecimals, String suffix, Range<Double> range) Create a converter producing values with a specified number of fraction digits and a specified suffix. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jppf.management.diagnostics.provider.MonitoringValueConverter.DoubleConverter
convert
-
Constructor Details
-
DoubleConverterWithFractionDigits
public DoubleConverterWithFractionDigits(int nbDecimals) Create a converter producing values with a specified number of fraction digits.- Parameters:
nbDecimals- number of digits after the decimal point.
-
DoubleConverterWithFractionDigits
Create a converter producing values with a specified number of fraction digits and a specified suffix.- Parameters:
nbDecimals- number of digits after the decimal point.suffix- suffix appended to the formatted number, e.g. " %". May benull.
-
DoubleConverterWithFractionDigits
Create a converter producing values with a specified number of fraction digits and a specified suffix.- Parameters:
nbDecimals- number of digits after the decimal point.suffix- suffix appended to the formatted number, e.g. " %". May benull.range- aN optional range of valid values.
-
-
Method Details
-
convert
Description copied from interface:MonitoringValueConverter.DoubleConverterConvert or format the specified value expressed as adouble.- Specified by:
convertin interfaceMonitoringValueConverter.DoubleConverter- Parameters:
value- the value to convert/format.- Returns:
- a string resulting from the conversion.
-