java.lang.Object
org.csveed.bean.conversion.AbstractConverter<Number>
org.csveed.bean.conversion.CustomNumberConverter
The Class CustomNumberConverter.
-
Constructor Summary
ConstructorsConstructorDescriptionCustomNumberConverter(Class<? extends Number> numberClass, boolean allowEmpty) Instantiates a new custom number converter.CustomNumberConverter(Class<? extends Number> numberClass, NumberFormat numberFormat, boolean allowEmpty) Instantiates a new custom number converter. -
Method Summary
Modifier and TypeMethodDescriptiondetermineValue(Object value) Determine value.fromString(String text) From string.To string.Methods inherited from class org.csveed.bean.conversion.AbstractConverter
getType, infoOnType
-
Constructor Details
-
CustomNumberConverter
public CustomNumberConverter(Class<? extends Number> numberClass, boolean allowEmpty) throws IllegalArgumentException Instantiates a new custom number converter.- Parameters:
numberClass- the number classallowEmpty- the allow empty- Throws:
IllegalArgumentException- the illegal argument exception
-
CustomNumberConverter
public CustomNumberConverter(Class<? extends Number> numberClass, NumberFormat numberFormat, boolean allowEmpty) throws IllegalArgumentException Instantiates a new custom number converter.- Parameters:
numberClass- the number classnumberFormat- the number formatallowEmpty- the allow empty- Throws:
IllegalArgumentException- the illegal argument exception
-
-
Method Details
-
fromString
Description copied from interface:ConverterFrom string.- Parameters:
text- the text- Returns:
- the k
- Throws:
Exception- the exception
-
determineValue
Determine value.- Parameters:
value- the value- Returns:
- the number
-
toString
Description copied from interface:ConverterTo string.- Parameters:
value- the value- Returns:
- the string
- Throws:
Exception- the exception
-