|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Parent interface of all operator objects in Postscript.
The parent interface of all the operator objects that are found in Postscript programming language. It is a subtype of PSObject,defining a new group of classes. It is used to group a set of classes which implement this interface to define specific types of operators.
It has a great number of subinterfaces,which specialize PSOperator's in different teams, with each interface having different semantics.
| Method Summary | |
java.lang.String |
getOperatorToken()
Returns the token identifying this operator. |
boolean |
isValid(PSStack s)
Checks if it valid to use this operator now. |
| Method Detail |
public java.lang.String getOperatorToken()
The implementor must use this function to return a word (String) which is actually
the name of the operator,as it is defined by operator's semantics. It will be implemented differently for each
concrete class that defines a new operator.
Precondition : A valid operator class,which implements subinterfaces of this one,has been created.
Postcondition : A string is returned,labeling the semantics of this class.
public boolean isValid(PSStack s)
throws PSSyntaxException
The programmer that implements this method,has to specify what valid is differently for each
concrete class (implementing an operator) created.Validation should take notice for:
a)the number of the parameters that the current operator needs,
and the number of the parameters that the stack contains
b)the type of the parameters that the current operator needs,
and the number of the parameters that the stack contains.
Precondition : A valid instance of PSStack is given and the class that implements this interface is valid.
Postcondition : A reply to the question whether the operator can perfom its define behaviour.
s - A reference to an instance of PSStack.
PSSyntaxException - The syntax of the token is wrong???
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||