Package dev.cel.common.values
Class CelValue
- java.lang.Object
-
- dev.cel.common.values.CelValue
-
- Direct Known Subclasses:
BoolValue,BytesValue,DoubleValue,DurationValue,EnumValue,ErrorValue,IntValue,ListValue,MapValue,NullValue,OpaqueValue,OptionalValue,StringValue,StructValue,TimestampValue,TypeValue,UintValue
@Immutable @Internal public abstract class CelValue extends java.lang.Object
A representation of a CEL value for the runtime. Clients should never directly extend from CelValue. Clients may extend some subclasses of CelValue, such as StructValue if it has been explicitly designed and documented for extension.
-
-
Constructor Summary
Constructors Constructor Description CelValue()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract CelTypecelType()The CelType that represents this value.abstract booleanisZeroValue()Returns true if thevalue()is a zero value for its type.abstract java.lang.Objectvalue()The underlying value.
-
-
-
Method Detail
-
value
public abstract java.lang.Object value()
The underlying value. This is typically the Java native value or a derived instance of CelValue (ex: an element in lists or key/value pair in maps).
-
isZeroValue
public abstract boolean isZeroValue()
Returns true if thevalue()is a zero value for its type.
-
celType
public abstract CelType celType()
The CelType that represents this value.
-
-