Top Description Constructors Methods
com.univocity.parsers.conversions

public Class BigDecimalConversion

extends ObjectConversion<BigDecimal>
Class Inheritance
Imports
java.math.*

Converts Strings to BigDecimals and vice versa
Author
Univocity Software Pty Ltd - [email protected]

Constructor Summary

AccessConstructor and Description
public
BigDecimalConversion()

Creates a Conversion from String to BigDecimal with default values to return when the input is null.

public
BigDecimalConversion(BigDecimal
default BigDecimal value to be returned when the input String is null. Used when ObjectConversion#execute(String) is invoked.
valueIfStringIsNull
,
String
default String value to be returned when a BigDecimal input is null. Used when revert(BigDecimal) is invoked.
valueIfObjectIsNull
)

Creates a Conversion from String to BigDecimal with default values to return when the input is null.

Method Summary

Modifier and TypeMethod and Description
protected BigDecimal
fromString(String
The String to be converted to T
input
)

Implements abstract com.univocity.parsers.conversions.ObjectConversion.fromString.

Converts a String to BigDecimal.
Inherited from com.univocity.parsers.conversions.ObjectConversion:
executefromInputgetValueIfObjectIsNullgetValueIfStringIsNullrevertsetValueIfObjectIsNullsetValueIfStringIsNullundo

Constructor Detail

BigDecimalConversionback to summary
public BigDecimalConversion()

Creates a Conversion from String to BigDecimal with default values to return when the input is null. This default constructor assumes the output of a conversion should be null when input is null

BigDecimalConversionback to summary
public BigDecimalConversion(BigDecimal valueIfStringIsNull, String valueIfObjectIsNull)

Creates a Conversion from String to BigDecimal with default values to return when the input is null.

Parameters
valueIfStringIsNull:BigDecimal

default BigDecimal value to be returned when the input String is null. Used when ObjectConversion#execute(String) is invoked.

valueIfObjectIsNull:String

default String value to be returned when a BigDecimal input is null. Used when revert(BigDecimal) is invoked.

Method Detail

fromStringback to summary
protected BigDecimal fromString(String input)

Implements abstract com.univocity.parsers.conversions.ObjectConversion.fromString.

Converts a String to BigDecimal.

Parameters
input:String

Doc from com.univocity.parsers.conversions.ObjectConversion.fromString.

The String to be converted to T

Returns:BigDecimal

Doc from com.univocity.parsers.conversions.ObjectConversion.fromString.

an instance of T, converted from the String input.

Annotations
@Override