Package dev.cel.common.types
Class MapType
- java.lang.Object
-
- dev.cel.common.types.CelType
-
- dev.cel.common.types.MapType
-
@CheckReturnValue @Immutable public abstract class MapType extends CelType
Maps are a parameterized type where the two parameters supported indicate thekeyType
andvalueType
of map entries.
-
-
Constructor Summary
Constructors Constructor Description MapType()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MapType
create(CelType keyType, CelType valueType)
CelType
keyType()
abstract CelKind
kind()
Return the typeCelKind
.abstract java.lang.String
name()
Return the type name.abstract com.google.common.collect.ImmutableList<CelType>
parameters()
Return the type parameters.CelType
valueType()
CelType
withParameters(com.google.common.collect.ImmutableList<CelType> parameters)
Instantiate a new copy of this type with alternativeparameters
.-
Methods inherited from class dev.cel.common.types.CelType
isAssignableFrom, withFreshTypeParamVariables
-
-
-
-
Method Detail
-
name
public abstract java.lang.String name()
Description copied from class:CelType
Return the type name.For struct types this should be the fully qualified name. Be wary of introducing unqualified type names as they may collide with future CEL type.
-
parameters
public abstract com.google.common.collect.ImmutableList<CelType> parameters()
Description copied from class:CelType
Return the type parameters. e.g. a map's key and valueCelType
.- Overrides:
parameters
in classCelType
-
withParameters
public CelType withParameters(com.google.common.collect.ImmutableList<CelType> parameters)
Description copied from class:CelType
Instantiate a new copy of this type with alternativeparameters
.If the
CelType
does not have anyparameters
, then the return value defaults to the original type instance.- Overrides:
withParameters
in classCelType
-
keyType
public CelType keyType()
-
valueType
public CelType valueType()
-
-