Package com.cedarpolicy.value
Class Decimal
java.lang.Object
com.cedarpolicy.value.Value
com.cedarpolicy.value.Decimal
Represents a Cedar fixed-point decimal extension value. Decimals are encoded as strings in
dot-decimal notation with 4 decimals after the dot (e.g.,
"1.0000").-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Decimal
Construct Decimal.- Parameters:
decimal- Decimal as a String.- Throws:
NullPointerExceptionIllegalArgumentException
-
-
Method Details
-
toCedarExpr
Convert Decimal to Cedar expr that can be used in a Cedar policy.- Specified by:
toCedarExprin classValue- Returns:
- Cedar source code for the value.
-
equals
Equals. -
hashCode
public int hashCode()Hash. -
toString
As a string.
-