public class BigDecType extends BaseValueType<BigDecimal>
BigDecimal type.
This class is threadsafe and uses a singleton pattern to prevent multiple instances, since all users can safely share the same instance.
clazzType| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
cast(Object o)
Attempt to cast the passed object to the generic type T.
|
static BigDecType |
instance()
Construct an instance of BigDecType
|
BigDecimal |
parse(String sourceValue)
Parses a String to a
BigDecType. |
getDestinationType, isParsable, toStringpublic static BigDecType instance()
public BigDecimal parse(String sourceValue) throws ParsingException
BigDecType. The String should already be trimmed.
Parsing is done by calling the BigDecimal.BigDecimal(String) constructor,
which accepts many different forms - refer there for valid String formats.
sourceValue - The source string, which should already be trimmed and may be nullParsingException - if unparsable.public BigDecimal cast(Object o) throws RuntimeException
ValueTypeRuntimeExceptionCopyright © 2021. All rights reserved.