Code:
@Override
public IAbstractQueryResult pop () { return lifo.pop();
}
Code:
IAbstractQueryResult resLeft = qres.pop()
Thank YOU
QResStack qres = new QResStack();
qres.push(new IntegerResult(1)); // (1)
qres.push(new IntegerResult(2)); // (2)
{ // (3)
IAbstractQueryResult resRight = qres.pop();
IAbstractQueryResult resLeft = qres.pop();
//iloczyn kartezjanski - operator przecinka
IBagResult commaRes = QExecUtils.cartesianProduct(resLeft,resRight);
qres.push(commaRes);
}
qres.push(new IntegerResult(3)); // (4)
qres.push(new IntegerResult(4)); // (5)
{ // (6)
IntegerResult resRight = (IntegerResult) qres.pop();
IntegerResult resLeft = (IntegerResult) qres.pop();
IntegerResult plusRes = new IntegerResult((Integer)resLeft.getValue() + (Integer)resRight.getValue());
qres.push(plusRes);
}
{ // (7)
IAbstractQueryResult resRight = qres.pop();
IAbstractQueryResult resLeft = qres.pop();
Comment