public final class ExchangeRateValue extends Object
Currency
to another Currency
. A String
is
used to create an object of this class. This value is internally converted to BigDecimal
. It is recommended
that you create the BigDecimal
from a String
rather than by using a Double
value.
The parameter is as follows:
rateValue - The exchange rate value as a String
.
Modifier and Type | Class and Description |
---|---|
static class |
ExchangeRateValue.ExchangeRateValueBuilder
A builder to validate if the input
String is a non negative numerical value. |
Constructor and Description |
---|
ExchangeRateValue(String rateValue)
A constructor to validate if the input
String is a non negative numeral value. |
Modifier and Type | Method and Description |
---|---|
static ExchangeRateValue.ExchangeRateValueBuilder |
builder() |
boolean |
equals(Object o) |
BigDecimal |
getDecimalValue() |
@NonNull String |
getRateValue() |
int |
hashCode() |
String |
toString() |
public ExchangeRateValue(@Nonnull String rateValue)
String
is a non negative numeral value. Also, trims the input
value for white space and creates the corresponding BigDecimal
.rateValue
- The exchange rate value as String
.@Nonnull public static ExchangeRateValue.ExchangeRateValueBuilder builder()
@NonNull public @NonNull String getRateValue()
@Nullable public BigDecimal getDecimalValue()
Copyright © 2020 SAP SE. All rights reserved.