Package org.apache.druid.math.expr
Enum ExprType
- java.lang.Object
-
- java.lang.Enum<ExprType>
-
- org.apache.druid.math.expr.ExprType
-
- All Implemented Interfaces:
Serializable
,Comparable<ExprType>
,TypeDescriptor
public enum ExprType extends Enum<ExprType> implements TypeDescriptor
Base 'value' types of Druid expression language, allExpr
must evaluate to one of these types.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isArray()
Value is an array of some otherTypeDescriptor
boolean
isNumeric()
Scalar numeric primitive values.boolean
isPrimitive()
Scalar numeric and string values.static ExprType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ExprType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static ExprType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ExprType c : ExprType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExprType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isNumeric
public boolean isNumeric()
Description copied from interface:TypeDescriptor
Scalar numeric primitive values.- Specified by:
isNumeric
in interfaceTypeDescriptor
- See Also:
ValueType.isNumeric()
,isNumeric()
-
isPrimitive
public boolean isPrimitive()
Description copied from interface:TypeDescriptor
Scalar numeric and string values. This does not currently include complex types.- Specified by:
isPrimitive
in interfaceTypeDescriptor
- See Also:
ValueType.isPrimitive()
,isPrimitive()
-
isArray
public boolean isArray()
Description copied from interface:TypeDescriptor
Value is an array of some otherTypeDescriptor
- Specified by:
isArray
in interfaceTypeDescriptor
- See Also:
ValueType.isArray()
,isArray()
-
-