org.datanucleus.store.mapped.expression
Class ScalarExpression.MonadicOperator

java.lang.Object
  extended by org.datanucleus.store.mapped.expression.ScalarExpression.Operator
      extended by org.datanucleus.store.mapped.expression.ScalarExpression.MonadicOperator
Enclosing class:
ScalarExpression

protected static class ScalarExpression.MonadicOperator
extends ScalarExpression.Operator

"Monadic" operator performs a function on one operand. It can be in either postfix or prefix notation.


Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.expression.ScalarExpression.Operator
precedence, symbol
 
Constructor Summary
ScalarExpression.MonadicOperator(java.lang.String symbol, int precedence)
          Monodiac operator
 
Method Summary
 boolean isHigherThan(ScalarExpression.Operator op)
          Check if this operator has higher precedence than op
 
Methods inherited from class org.datanucleus.store.mapped.expression.ScalarExpression.Operator
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScalarExpression.MonadicOperator

public ScalarExpression.MonadicOperator(java.lang.String symbol,
                                        int precedence)
Monodiac operator

Parameters:
symbol - the source text or symbol of an operator. e.g =, ==, +, /, >, <, etc
precedence - the order of precedence where the expression is compiled
Method Detail

isHigherThan

public boolean isHigherThan(ScalarExpression.Operator op)
Check if this operator has higher precedence than op

Parameters:
op - the operator
Returns:
true if this operation is higher


Copyright © 2010. All Rights Reserved.