public class ErpDecimal extends Number implements ErpType<ErpDecimal>
This class translates the representation of decimals in an ERP, which uses the last character in its string representation to indicate the decimal's sign (e.g., "12.34-" for negative and "23.45 " for positive numbers).
Constructor and Description |
---|
ErpDecimal(BigDecimal value) |
ErpDecimal(Double value)
Constructor.
|
ErpDecimal(Float value)
Constructor.
|
ErpDecimal(String value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
double |
doubleValue() |
boolean |
equals(Object o) |
float |
floatValue() |
ErpTypeConverter<ErpDecimal> |
getTypeConverter()
Get the type converter for the ERP type.
|
BigDecimal |
getValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
String |
toString() |
byteValue, shortValue
public ErpDecimal(@Nonnull String value)
value
- The String value.IllegalArgumentException
- when the input value could not be converted.public ErpDecimal(@Nonnull Float value)
value
- The Float value.IllegalArgumentException
- when the input value could not be converted.public ErpDecimal(@Nonnull Double value)
value
- The Double value.IllegalArgumentException
- when the input value could not be converted.public ErpDecimal(@Nonnull BigDecimal value)
@Nonnull public ErpTypeConverter<ErpDecimal> getTypeConverter()
ErpType
getTypeConverter
in interface ErpType<ErpDecimal>
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
@Nonnull public BigDecimal getValue()
Copyright © 2020 SAP SE. All rights reserved.