|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.fzi.XPath.Expr
Class Expr
correspons to XPath expression in general. It is a
base class for other types of expressions.
Field Summary | |
static int |
ADD_OP
+ (addition) operator code. |
static int |
AND_OP
and operator code. |
static int |
DIV_OP
div (division) operator code. |
static int |
EQ_OP
= (equal) operator code. |
static int |
GT_OP
> (greater-than) operator code. |
static int |
GTE_OP
>= (greater-than or equal) operator code. |
static int |
LT_OP
< (less-than) operator code. |
static int |
LTE_OP
<= (less-than or equal) operator code. |
static int |
MOD_OP
mod (modula) operator code. |
static int |
MUL_OP
* (multiplication) operator code. |
static int |
NEQ_OP
!= (not equal) operator code. |
static int |
NOP_OP
No operator code. |
static int |
OR_OP
or operator code. |
static int |
SUB_OP
- (substraction) operator code. |
static int |
U_OP
| (union) operator code. |
Constructor Summary | |
Expr()
|
Method Summary | |
boolean |
getNegative()
Returns true if this expression is negative. |
int |
getOperator()
Returns operator code of this expression. |
java.lang.String |
getOperatorAsString()
Returns operator of this expression in string representation. |
static java.lang.String |
getOperatorName(int operator)
Returns string representation of given Operator. |
boolean |
getPositive()
Returns true if this expression is positive. |
void |
setOperator(int operator)
Sets operator code of this expression. |
void |
setPositive(boolean thepositive)
Sets the sign of the expression. |
java.lang.String |
toString()
Returns string representation of expression. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NOP_OP
public static final int OR_OP
or
operator code.public static final int AND_OP
and
operator code.public static final int EQ_OP
=
(equal) operator code.public static final int NEQ_OP
!=
(not equal) operator code.public static final int LT_OP
<
(less-than) operator code.public static final int LTE_OP
<=
(less-than or equal) operator code.public static final int GT_OP
>
(greater-than) operator code.public static final int GTE_OP
>=
(greater-than or equal) operator code.public static final int ADD_OP
+
(addition) operator code.public static final int SUB_OP
-
(substraction) operator code.public static final int MUL_OP
*
(multiplication) operator code.public static final int DIV_OP
div
(division) operator code.public static final int MOD_OP
mod
(modula) operator code.public static final int U_OP
|
(union) operator code.Constructor Detail |
public Expr()
Method Detail |
public void setPositive(boolean thepositive)
thepositive
- if true
, expression will become
positive, otherwise - negative.public boolean getPositive()
true
if this expression is positive.true
if this expression is positive.
Otherwise returns false.getNegative()
public boolean getNegative()
true
if this expression is negative.true
if this expression is negative.
Otherwise returns false.getPositive()
public java.lang.String toString()
toString
in class java.lang.Object
public void setOperator(int operator)
operator
- code of operator (one of CODE_OP
fields of this
class) that precedes this exception.-a + b * - c
-
will be the sign of expression a
,
+
will be the operator of expression b
,
*
will be the operator of expression c
,
AND -
will be the sign of expression
c
.setPositive(boolean)
,
getPositive()
,
getNegative()
public int getOperator()
CODE_OP
fields of this class).public java.lang.String getOperatorAsString()
CODE_OP
fields of this class).public static java.lang.String getOperatorName(int operator)
Operator
- Operator code.""
if Operator is not defined.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |