public class ZeroPaddingIntegerConverter extends AbstractIntegerConverter<Integer>
| Constructor and Description |
|---|
ZeroPaddingIntegerConverter(int zeroPadLength)
Constructs this converter.
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
convertToObject(String value,
Locale locale)
Converts the given
String value |
String |
convertToString(Integer value,
Locale locale)
Converts the given value to a string.
|
protected Class<Integer> |
getTargetType() |
getNumberFormatparsenewConversionException, parsepublic ZeroPaddingIntegerConverter(int zeroPadLength)
zeroPadLength - Minimum length of String to be outputted (will be zero-padded).public String convertToString(Integer value, Locale locale)
IConverterconvertToString in interface IConverter<Integer>convertToString in class AbstractNumberConverter<Integer>value - The value to convertlocale - The locale used to convert the valueAbstractConverter.convertToString(java.lang.Object,
java.util.Locale)public Integer convertToObject(String value, Locale locale)
IConverterString valuevalue - The string value to convertlocale - The locale used to convert the valueIConverter.convertToObject(java.lang.String,Locale)protected Class<Integer> getTargetType()
getTargetType in class AbstractConverter<Integer>AbstractConverter.getTargetType()Copyright © 2006–2014 Apache Software Foundation. All rights reserved.