|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.operation.Operation net.sf.magicproject.operation.UnaryOperation
public abstract class UnaryOperation
Represents an unary operation.
Constructor Summary | |
---|---|
UnaryOperation()
Creates a new instance of UnaryOperation |
Method Summary | |
---|---|
abstract java.lang.String |
getOperator()
Return operator name |
abstract int |
process(int leftValue,
int rightValue)
Process a binary operation with two values and return the result. |
Expression |
readNextExpression(java.io.InputStream inputFile)
return the next Expression read from the current offset |
Methods inherited from class net.sf.magicproject.operation.Operation |
---|
isUselessWith |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnaryOperation()
Method Detail |
---|
public Expression readNextExpression(java.io.InputStream inputFile) throws java.io.IOException
Operation
readNextExpression
in class Operation
inputFile
- is the file containing this expression
java.io.IOException
- if error occured during the reading process from the specified
input streampublic abstract int process(int leftValue, int rightValue)
Operation
process
in class Operation
leftValue
- the left value of binary operationrightValue
- the right value of binary operation
public abstract java.lang.String getOperator()
Operation
getOperator
in class Operation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |