Interface MendixDecimal
- All Superinterfaces:
IMendixObjectMember<BigDecimal>
Provides the interface for a Mendix attribute with type Decimal.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mendix.systemwideinterfaces.core.IMendixObjectMember
IMendixObjectMember.MemberState, IMendixObjectMember.MemberValueState
-
Method Summary
Modifier and TypeMethodDescriptiongetValueFromString
(String stringValue) If stringValue is empty or null returns null, otherwise replaces commas (",") with dots (".").Methods inherited from interface com.mendix.systemwideinterfaces.core.IMendixObjectMember
getMemberValueState, getName, getOriginalValue, getState, getValue, hasReadAccess, hasWriteAccess, isChanged, isValueChanged, isVirtual, parseValueFromString, parseValueToString, setValue, toString
-
Method Details
-
getValueFromString
If stringValue is empty or null returns null, otherwise replaces commas (",") with dots ("."). Then converts resulting string usingBigDecimal(String)
toBigDecimal
. Then sets scale usingBigDecimal.setScale(int, RoundingMode)
with scale 8 and HALF_UP rounding.- Specified by:
getValueFromString
in interfaceIMendixObjectMember<BigDecimal>
- Parameters:
stringValue
- the string to parse- Returns:
- the BigDecimal value parsed from the string
- Throws:
NumberFormatException
- if the absolute value of the resulting value after setting scale is not less than 1e20
-