Package org.kie.dmn.feel.lang.types
Enum BuiltInType
- java.lang.Object
-
- java.lang.Enum<BuiltInType>
-
- org.kie.dmn.feel.lang.types.BuiltInType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BuiltInType>,SimpleType,Type
public enum BuiltInType extends java.lang.Enum<BuiltInType> implements SimpleType
-
-
Field Summary
-
Fields inherited from interface org.kie.dmn.feel.lang.SimpleType
ANY, BOOLEAN, CONTEXT, DATE, DATE_AND_TIME, DAYS_AND_TIME_DURATION, FUNCTION, LIST, NUMBER, STRING, TIME, YEARS_AND_MONTHS_DURATION
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconformsTo(Type t)Check if this type does Conform to specified typetaccordingly to FEEL DMN specification 10.3.2.9.2 Type Conformancestatic TypedetermineTypeFromInstance(java.lang.Object o)static TypedetermineTypeFromName(java.lang.String name)java.lang.ObjectfromString(java.lang.String value)java.lang.StringgetName()java.lang.String[]getNames()java.util.Collection<BuiltInTypeSymbol>getSymbols()booleanisAssignableValue(java.lang.Object value)Check if the value passed as parameter can be assigned to this type.booleanisInstanceOf(java.lang.Object o)Definition of `instance of` accordingly to FEEL specifications Table 49.static booleanisInstanceOf(java.lang.Object o, java.lang.String name)static booleanisInstanceOf(java.lang.Object o, Type t)static <T> java.util.function.Function<org.kie.dmn.api.feel.runtime.events.FEELEvent,T>justNull()java.lang.StringtoString()java.lang.StringtoString(java.lang.Object value)static BuiltInTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static BuiltInType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final BuiltInType UNKNOWN
-
NUMBER
public static final BuiltInType NUMBER
-
STRING
public static final BuiltInType STRING
-
DATE
public static final BuiltInType DATE
-
TIME
public static final BuiltInType TIME
-
DATE_TIME
public static final BuiltInType DATE_TIME
-
DURATION
public static final BuiltInType DURATION
-
BOOLEAN
public static final BuiltInType BOOLEAN
-
RANGE
public static final BuiltInType RANGE
-
FUNCTION
public static final BuiltInType FUNCTION
-
LIST
public static final BuiltInType LIST
-
CONTEXT
public static final BuiltInType CONTEXT
-
UNARY_TEST
public static final BuiltInType UNARY_TEST
-
-
Method Detail
-
values
public static BuiltInType[] 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 (BuiltInType c : BuiltInType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BuiltInType valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getNames
public java.lang.String[] getNames()
-
fromString
public java.lang.Object fromString(java.lang.String value)
-
toString
public java.lang.String toString(java.lang.Object value)
-
justNull
public static <T> java.util.function.Function<org.kie.dmn.api.feel.runtime.events.FEELEvent,T> justNull()
-
getSymbols
public java.util.Collection<BuiltInTypeSymbol> getSymbols()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<BuiltInType>
-
determineTypeFromName
public static Type determineTypeFromName(java.lang.String name)
-
determineTypeFromInstance
public static Type determineTypeFromInstance(java.lang.Object o)
-
isInstanceOf
public static boolean isInstanceOf(java.lang.Object o, Type t)
-
isInstanceOf
public static boolean isInstanceOf(java.lang.Object o, java.lang.String name)
-
isInstanceOf
public boolean isInstanceOf(java.lang.Object o)
Description copied from interface:TypeDefinition of `instance of` accordingly to FEEL specifications Table 49.- Specified by:
isInstanceOfin interfaceType- Returns:
- if o is instance of the type represented by this type. If the parameter is null, returns false.
-
isAssignableValue
public boolean isAssignableValue(java.lang.Object value)
Description copied from interface:TypeCheck if the value passed as parameter can be assigned to this type.- Specified by:
isAssignableValuein interfaceType- Returns:
- if value can be assigned to the type represented by this type. If the parameter is null, returns true.
-
conformsTo
public boolean conformsTo(Type t)
Description copied from interface:TypeCheck if this type does Conform to specified typetaccordingly to FEEL DMN specification 10.3.2.9.2 Type Conformance- Specified by:
conformsToin interfaceType- Returns:
- if this type does conform to specified type.
-
-