Enum LyreExpressionType
- java.lang.Object
-
- java.lang.Enum<LyreExpressionType>
-
- com.gengoai.hermes.extraction.lyre.LyreExpressionType
-
- All Implemented Interfaces:
Tag
,Serializable
,Comparable<LyreExpressionType>
public enum LyreExpressionType extends Enum<LyreExpressionType> implements Tag
Enumeration of the different types Lyre Expressions
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COUNTER
An expression that returns a Counter as a resultFEATURE
An expression that returns a Feature as a resultHSTRING
An expression that returns an HString as a resultNUMERIC
An expression that returns a number as a resultOBJECT
An expression that returns an Object as a resultPREDICATE
A predicate expression that returns true / falseSTRING
An expression that returns an String as a result
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static LyreExpressionType
determineCommonType(@NonNull Collection<LyreExpression> expressions)
protected abstract LyreExpressionType
selectMostCommon(LyreExpressionType other)
static LyreExpressionType
valueOf(String name)
Returns the enum constant of this type with the specified name.static LyreExpressionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.gengoai.Tag
isInstance, isInstance, label, name, parent
-
-
-
-
Enum Constant Detail
-
PREDICATE
public static final LyreExpressionType PREDICATE
A predicate expression that returns true / false
-
HSTRING
public static final LyreExpressionType HSTRING
An expression that returns an HString as a result
-
STRING
public static final LyreExpressionType STRING
An expression that returns an String as a result
-
FEATURE
public static final LyreExpressionType FEATURE
An expression that returns a Feature as a result
-
OBJECT
public static final LyreExpressionType OBJECT
An expression that returns an Object as a result
-
NUMERIC
public static final LyreExpressionType NUMERIC
An expression that returns a number as a result
-
COUNTER
public static final LyreExpressionType COUNTER
An expression that returns a Counter as a result
-
-
Method Detail
-
values
public static LyreExpressionType[] 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 (LyreExpressionType c : LyreExpressionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LyreExpressionType 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
-
determineCommonType
protected static LyreExpressionType determineCommonType(@NonNull @NonNull Collection<LyreExpression> expressions)
-
selectMostCommon
protected abstract LyreExpressionType selectMostCommon(LyreExpressionType other)
-
-