Package org.xcsp.common
Enum Types.TypeArithmeticOperator
- java.lang.Object
-
- java.lang.Enum<Types.TypeArithmeticOperator>
-
- org.xcsp.common.Types.TypeArithmeticOperator
-
- All Implemented Interfaces:
Serializable
,Comparable<Types.TypeArithmeticOperator>
- Enclosing class:
- Types
public static enum Types.TypeArithmeticOperator extends Enum<Types.TypeArithmeticOperator>
The enum type specifying the different types of operators that can be used in elements.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Types.TypeExpr
toExpr()
The type fromTypeExpr
with the same name as this type, if it exists,null
otherwise.static Types.TypeArithmeticOperator
valueOf(String name)
Returns the enum constant of this type with the specified name.static Types.TypeArithmeticOperator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADD
public static final Types.TypeArithmeticOperator ADD
-
SUB
public static final Types.TypeArithmeticOperator SUB
-
MUL
public static final Types.TypeArithmeticOperator MUL
-
DIV
public static final Types.TypeArithmeticOperator DIV
-
MOD
public static final Types.TypeArithmeticOperator MOD
-
DIST
public static final Types.TypeArithmeticOperator DIST
-
POW
public static final Types.TypeArithmeticOperator POW
-
-
Method Detail
-
values
public static Types.TypeArithmeticOperator[] 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 (Types.TypeArithmeticOperator c : Types.TypeArithmeticOperator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Types.TypeArithmeticOperator 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
-
toExpr
public Types.TypeExpr toExpr()
The type fromTypeExpr
with the same name as this type, if it exists,null
otherwise.- Returns:
- The type from
TypeExpr
with the same name as this type, if it exists,null
otherwise
-
-