Class CelDecimal
java.lang.Object
io.confluent.kafka.schemaregistry.rules.cel.builtin.CelDecimal
- All Implemented Interfaces:
Comparable<CelDecimal>
The runtime Java representation of the CEL
confluent.type.Decimal type
(CelTypeLabels.DECIMAL): a BigDecimal whose equals is numeric.
Must not extend Number. cel-java's RuntimeEquality.objectEquals
short-circuits on instanceof Number into ComparisonFunctions.numericEquals,
which knows only Double / Long / UnsignedLong and answers false for any BigDecimal pair.
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CelDecimal other) booleanNumeric, scale-insensitive — the same answerdecimals.eqgives.inthashCode()static CelDecimalof(BigDecimal value) static CelDecimalofUnscaled(byte[] unscaled, int scale) From unscaled two's-complement big-endian bytes plus a scale — the encoding an Avrodecimallogical type and aconfluent.type.Decimalmessage both use.toString()value()The wrappedBigDecimal— the logical-type Java rep.
-
Method Details
-
of
-
ofUnscaled
From unscaled two's-complement big-endian bytes plus a scale — the encoding an Avrodecimallogical type and aconfluent.type.Decimalmessage both use. -
value
The wrappedBigDecimal— the logical-type Java rep. -
equals
Numeric, scale-insensitive — the same answerdecimals.eqgives. -
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<CelDecimal>
-
toString
-