Enum TermType
- All Implemented Interfaces:
Serializable, Comparable<TermType>, java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConstraint Logic Programming variable -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final booleanprivate final booleanprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTermType(boolean isStructure, boolean isNumeric, boolean isVariable, int precedence) -
Method Summary
Modifier and TypeMethodDescriptionintUsed to consistently orderTerms of different types.booleanbooleanbooleanstatic TermTypeReturns the enum constant of this type with the specified name.static TermType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VARIABLE
- See Also:
-
CLP_VARIABLE
Constraint Logic Programming variable -
FRACTION
- See Also:
-
INTEGER
- See Also:
-
EMPTY_LIST
- See Also:
-
ATOM
- See Also:
-
STRUCTURE
- See Also:
-
LIST
- See Also:
-
-
Field Details
-
isStructure
private final boolean isStructure -
isNumeric
private final boolean isNumeric -
isVariable
private final boolean isVariable -
precedence
private final int precedence
-
-
Constructor Details
-
TermType
private TermType(boolean isStructure, boolean isNumeric, boolean isVariable, int precedence)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
isStructure
public boolean isStructure()- Returns:
trueif this type represents "compound structure"
-
isNumeric
public boolean isNumeric()- Returns:
trueif this type represents instances ofNumeric
-
isVariable
public boolean isVariable()- Returns:
trueif this type represents a variable
-
getPrecedence
public int getPrecedence()Used to consistently orderTerms of different types.- Returns:
- precedence of this type
- See Also:
-