Package com.jidesoft.converter
Class PercentConverter
- java.lang.Object
-
- com.jidesoft.converter.NumberConverter
-
- com.jidesoft.converter.NumberFormatConverter
-
- com.jidesoft.converter.PercentConverter
-
- All Implemented Interfaces:
ObjectConverter
public class PercentConverter extends NumberFormatConverter
Converter which converts percentage to String and converts it back.
-
-
Field Summary
Fields Modifier and Type Field Description static ConverterContextCONTEXT-
Fields inherited from class com.jidesoft.converter.NumberConverter
CONTEXT_FRACTION_NUMBER
-
-
Constructor Summary
Constructors Constructor Description PercentConverter()PercentConverter(java.text.NumberFormat format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectfromString(java.lang.String string, ConverterContext context)Converts from String to an object.-
Methods inherited from class com.jidesoft.converter.NumberFormatConverter
supportFromString
-
Methods inherited from class com.jidesoft.converter.NumberConverter
getDefaultNumberFormat, getNumberFormat, isAvoidNegativeZero, isGroupingUsed, parseNumber, setAvoidNegativeZero, setCurrency, setFractionDigits, setGroupingUsed, setIntegerDigits, setNumberFormat, setRoundingMode, supportToString, toString
-
-
-
-
Field Detail
-
CONTEXT
public static ConverterContext CONTEXT
-
-
Method Detail
-
fromString
public java.lang.Object fromString(java.lang.String string, ConverterContext context)Description copied from interface:ObjectConverterConverts from String to an object.- Specified by:
fromStringin interfaceObjectConverter- Overrides:
fromStringin classNumberFormatConverter- Parameters:
string- the stringcontext- context to be converted- Returns:
- the object converted from string
-
-