public class Operators
extends java.lang.Object
Constructor and Description |
---|
Operators() |
Modifier and Type | Method and Description |
---|---|
static Primitives.BooleanExpression |
and(Node left,
Node right)
'
& ' or 'and ' logical and operator |
static Node |
division(Node left,
Node right)
'
/ ' division operator |
static Primitives.BooleanExpression |
equal(Node left,
Node right)
'
= ' equal operator |
static Primitives.BooleanExpression |
greaterEqual(Node left,
Node right)
'
>= ' greater equal operator |
static Primitives.BooleanExpression |
greaterThan(Node left,
Node right)
'
> ' greater than operator |
static Primitives.BooleanExpression |
is(Node left,
Node right)
'
is ' is operator (to check for string equality) |
static Primitives.BooleanExpression |
lessEqual(Node left,
Node right)
'
<= ' less equal operator |
static Primitives.BooleanExpression |
lessThan(Node left,
Node right)
'
< ' less than operator |
static Node |
minus(Node left,
Node right)
'
- ' minus operator |
static Primitives.BooleanExpression |
not(Node expr)
'
! ' or 'not ' logical not operator |
static Primitives.BooleanExpression |
or(Node left,
Node right)
'
| ' or 'or ' logical or operator |
static Node |
plus(Node left,
Node right)
'
+ ' plus operator |
static Node |
pow(Node left,
Node right)
'
^ ' power operator |
static Primitives.BooleanExpression |
regexp(Node left,
Node right)
'
regexp ' regexp operator (to check for string matching a given
regular expression) |
static Node |
times(Node left,
Node right)
'
* ' times operator |
static Node |
uminus(Node expr)
'
- ' unary minus operator |
static Node |
uplus(Node expr)
'
+ ' unary plus operator |
public static Node plus(Node left, Node right) throws SemanticException
+
' plus operatorSemanticException
public static Node minus(Node left, Node right) throws SemanticException
-
' minus operatorSemanticException
public static Node times(Node left, Node right) throws SemanticException
*
' times operatorSemanticException
public static Node division(Node left, Node right) throws SemanticException
/
' division operatorSemanticException
public static Node uplus(Node expr) throws SemanticException
+
' unary plus operatorSemanticException
public static Node uminus(Node expr) throws SemanticException
-
' unary minus operatorSemanticException
public static Node pow(Node left, Node right) throws SemanticException
^
' power operatorSemanticException
public static Primitives.BooleanExpression lessThan(Node left, Node right) throws SemanticException
<
' less than operatorSemanticException
public static Primitives.BooleanExpression lessEqual(Node left, Node right) throws SemanticException
<=
' less equal operatorSemanticException
public static Primitives.BooleanExpression greaterThan(Node left, Node right) throws SemanticException
>
' greater than operatorSemanticException
public static Primitives.BooleanExpression greaterEqual(Node left, Node right) throws SemanticException
>=
' greater equal operatorSemanticException
public static Primitives.BooleanExpression equal(Node left, Node right) throws SemanticException
=
' equal operatorSemanticException
public static Primitives.BooleanExpression not(Node expr) throws SemanticException
!
' or 'not
' logical not operatorSemanticException
public static Primitives.BooleanExpression and(Node left, Node right) throws SemanticException
&
' or 'and
' logical and operatorSemanticException
public static Primitives.BooleanExpression or(Node left, Node right) throws SemanticException
|
' or 'or
' logical or operatorSemanticException
public static Primitives.BooleanExpression is(Node left, Node right) throws SemanticException
is
' is operator (to check for string equality)SemanticException
public static Primitives.BooleanExpression regexp(Node left, Node right) throws SemanticException
regexp
' regexp operator (to check for string matching a given
regular expression)SemanticException