|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gibello.zql.ZExpression
public class ZExpression
ZExpression: an SQL Expression An SQL expression is an operator and one or more operands Example: a AND b AND c -> operator = AND, operands = (a, b, c)
Constructor Summary | |
---|---|
ZExpression(java.lang.String op)
Create an SQL Expression given the operator |
|
ZExpression(java.lang.String op,
ZExp o1)
Create an SQL Expression given the operator and 1st operand |
|
ZExpression(java.lang.String op,
ZExp o1,
ZExp o2)
Create an SQL Expression given the operator, 1st and 2nd operands |
Method Summary | |
---|---|
void |
addOperand(ZExp o)
Add an operand to the current expression. |
ZExp |
getOperand(int pos)
Get an operand according to its index (position). |
java.util.Vector |
getOperands()
Get this expression's operands. |
java.lang.String |
getOperator()
Get this expression's operator. |
int |
nbOperands()
Get the number of operands |
void |
setOperands(java.util.Vector v)
Set the operands list |
java.lang.String |
toReversePolish()
String form of the current expression (reverse polish notation). |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ZExpression(java.lang.String op)
op
- The operatorpublic ZExpression(java.lang.String op, ZExp o1)
op
- The operatoro1
- The 1st operandpublic ZExpression(java.lang.String op, ZExp o1, ZExp o2)
op
- The operatoro1
- The 1st operando2
- The 2nd operandMethod Detail |
---|
public java.lang.String getOperator()
public void setOperands(java.util.Vector v)
v
- A vector that contains all operands (ZExp objects).public java.util.Vector getOperands()
public void addOperand(ZExp o)
o
- The operand to add.public ZExp getOperand(int pos)
pos
- The operand index, starting at 0.
public int nbOperands()
public java.lang.String toReversePolish()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |