|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.iquery.metadata.serverprop.Operator
@ThreadSafe public final class Operator
Models an operator definition that can be used within expressions to perform more complex queries. This class extends the Function class because operators can be viewed as functions with one or two parameters. For example, the A+B expression using the "+" operator can also be viewed as +(A,B) where "+" is a function instead of an operator. In this modeling context, they can be viewed as equivalent. We model operators as extensions of the Function class, and not as Functions themselves, since visuals and users who interact with them prefer to use an operator syntax and that operator syntax requires an operator precedence which does not apply for functions since their arguments are delineated by parentheses and operators are not.
To model an expression using an operator definition use the FunctionCall class.
FunctionCall
,
Function
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getPrecedence()
Returns the relative precedence of this operator's definition. |
int |
hashCode()
|
boolean |
isBinary()
Returns whether this operator definition is for a binary operator or not. |
boolean |
isUnary()
Returns whether this operator definition is for a unary operator or not. |
Methods inherited from class com.sas.iquery.metadata.serverprop.Function |
---|
getArgumentCount, getCategory, getCompatibleSignature, getDescription, getDescription, getDescriptions, getFunctionNameID, getID, getLabel, getLabel, getLabels, getNameID, getSignatures, getSyntaxTemplateFor, getSyntaxToken, getToolTip, getToolTip, isDistinct, isInCategory |
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class Function
obj
- Object to compare this one to.
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Function
Object.hashCode()
public int getPrecedence()
public boolean isUnary()
-A+B
the negation operator
in front of A is a unary operator (it takes one argument) while the + operator
is a binary operator, taking -A and B as its arguments.
public boolean isBinary()
-A+B
the negation operator
in front of A is a unary operator (it takes one argument) while the + operator
is a binary operator, taking -A and B as its arguments.
|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |