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
@Immutable public enum ExprType extends Enum<ExprType> implements TypeDescriptor
Base 'value' types of Druid expression language, allExprmust evaluate to one of these types.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisArray()Value is an array of some otherTypeDescriptorbooleanisNumeric()Scalar numeric primitive values.booleanisPrimitive()Scalar numeric and string values.static ExprTypevalueOf(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:TypeDescriptorScalar numeric primitive values.- Specified by:
isNumericin interfaceTypeDescriptor- See Also:
ValueType.isNumeric(),isNumeric()
-
isPrimitive
public boolean isPrimitive()
Description copied from interface:TypeDescriptorScalar numeric and string values. This does not currently include complex types.- Specified by:
isPrimitivein interfaceTypeDescriptor- See Also:
ValueType.isPrimitive(),isPrimitive()
-
isArray
public boolean isArray()
Description copied from interface:TypeDescriptorValue is an array of some otherTypeDescriptor- Specified by:
isArrayin interfaceTypeDescriptor- See Also:
ValueType.isArray(),isArray()
-
-