public final class BigDecimalConverter extends NumberConverter.DecimalType<BigDecimal>
NumberConverter
implementation for the
java.math.BigDecimal
type.NumberPattern
,
ConverterFactory.forBigDecimal(String)
NumberConverter.DecimalType<V extends Number>, NumberConverter.IntegerType<V extends Number>
Modifier and Type | Field and Description |
---|---|
static BigDecimalConverter |
DEFAULT
BigDecimalConverter default instance. |
pattern
Modifier and Type | Method and Description |
---|---|
protected BigDecimal |
doDecodeDefault(String value)
Converts default string representation of decimal value into
java.math.BigDecimal object. |
protected NumberFormat |
getFormat(ValidationContext<?> context)
Returns decimal number format for the specified context and this
converter configuration.
|
Class<BigDecimal> |
getType()
Returns
java.math.BigDecimal type. |
appendMessageArguments, doDecode, doEncode, doEncodeDefault
decode, encode
getMessageTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessageTemplate
public static final BigDecimalConverter DEFAULT
BigDecimalConverter
default instance.public Class<BigDecimal> getType()
java.math.BigDecimal
type.java.math.BigDecimal
type.protected BigDecimal doDecodeDefault(String value)
java.math.BigDecimal
object.doDecodeDefault
in class NumberConverter<BigDecimal>
value
- Default string representation of decimal value.java.math.BigDecimal
object.NumberFormatException
- if the specified string could not be
parsed as a decimal.protected NumberFormat getFormat(ValidationContext<?> context)
getFormat
in class NumberConverter.DecimalType<BigDecimal>
context
- Validation context.Copyright © 2011–2020 FoxLabs. All rights reserved.