Class NumberConverter
- java.lang.Object
-
- com.norconex.commons.lang.convert.AbstractConverter
-
- com.norconex.commons.lang.convert.NumberConverter
-
- All Implemented Interfaces:
IConverter
public class NumberConverter extends AbstractConverter
Number conversion. Following types are supported:
- Byte
- byte
- Short
- short
- Integer
- int
- Float
- float
- Long
- long
- Double
- double
- BigInteger
- BigDecimal
- Since:
- 2.0.0
- Author:
- Pascal Essiembre
-
-
Constructor Summary
Constructors Constructor Description NumberConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringnullSafeToString(Object object)protected <T> TnullSafeToType(String value, Class<T> type)-
Methods inherited from class com.norconex.commons.lang.convert.AbstractConverter
equals, hashCode, toString, toString, toStringException, toStringException, toType, toTypeException, toTypeException, toUnsupportedTypeException
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.norconex.commons.lang.convert.IConverter
toString, toType
-
-
-
-
Method Detail
-
nullSafeToType
protected <T> T nullSafeToType(String value, Class<T> type)
- Specified by:
nullSafeToTypein classAbstractConverter
-
nullSafeToString
protected String nullSafeToString(Object object)
- Specified by:
nullSafeToStringin classAbstractConverter
-
-