public enum Calc extends Enum<Calc>
Enum Constant and Description |
---|
DIV
Division.
|
IDIV
Integer division.
|
MINUS
Subtraction.
|
MOD
Modulo.
|
MULT
Multiplication.
|
PLUS
Addition.
|
Modifier and Type | Method and Description |
---|---|
abstract Item |
ev(InputInfo ii,
Item it1,
Item it2)
Performs the calculation.
|
String |
toString() |
static Type |
type(Type t1,
Type t2)
Returns the numeric type with the highest precedence.
|
static Calc |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Calc[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Calc PLUS
public static final Calc MINUS
public static final Calc MULT
public static final Calc DIV
public static final Calc IDIV
public static final Calc MOD
public static Calc[] values()
for (Calc c : Calc.values()) System.out.println(c);
public static Calc valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract Item ev(InputInfo ii, Item it1, Item it2) throws QueryException
ii
- input infoit1
- first itemit2
- second itemQueryException
- query exceptionpublic static Type type(Type t1, Type t2)
t1
- first item typet2
- second item typeCopyright © 2005–2015 BaseX Team. All rights reserved.