org.zkoss.zuss.metainfo
Enum Operator.Type

java.lang.Object
  extended by java.lang.Enum<Operator.Type>
      extended by org.zkoss.zuss.metainfo.Operator.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Operator.Type>
Enclosing class:
Operator

public static enum Operator.Type
extends java.lang.Enum<Operator.Type>

Types of the operators.


Enum Constant Summary
ADD
          The addition.
AND
          The AND operatr.
COMMA
          Argument separator.
CONCAT
          Concatenation.
DIVIDE
          The division.
EQ
          Equals.
FUNC
          Function operator.
GE
          Greater than or equals.
GT
          Greater than.
LE
          Less than or equals.
LPAREN
          Left parenthesis, '('.
LT
          Less than.
MULTIPLY
          The multiplication.
NE
          Not equals.
NEGATE
          The negation.
OR
          The OR oeprator.
RPAREN
          Right parenthesis, ')'.
SUBTRACT
          The subtraction.
 
Method Summary
 int getArgumentNumber()
          Returns the number arguments that this operator expects.
 java.lang.String getName()
          Returns the name of this operator.
 int getPrecedence()
          Returns the precedence of this operator.
 java.lang.Object invoke(java.lang.Object... args)
          Invokes the operator.
 java.lang.String toString()
           
static Operator.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Operator.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CONCAT

public static final Operator.Type CONCAT
Concatenation. Represent the 'implied' operator if two consecutive operands have no opearator in between.


NEGATE

public static final Operator.Type NEGATE
The negation.


ADD

public static final Operator.Type ADD
The addition.


SUBTRACT

public static final Operator.Type SUBTRACT
The subtraction.


MULTIPLY

public static final Operator.Type MULTIPLY
The multiplication.


DIVIDE

public static final Operator.Type DIVIDE
The division.


EQ

public static final Operator.Type EQ
Equals.


NE

public static final Operator.Type NE
Not equals.


OR

public static final Operator.Type OR
The OR oeprator.


AND

public static final Operator.Type AND
The AND operatr.


GT

public static final Operator.Type GT
Greater than.


LT

public static final Operator.Type LT
Less than.


GE

public static final Operator.Type GE
Greater than or equals.


LE

public static final Operator.Type LE
Less than or equals.


LPAREN

public static final Operator.Type LPAREN
Left parenthesis, '('. Not a real operator but for parsing purpose.


RPAREN

public static final Operator.Type RPAREN
Right parenthesis, ')'. Not a real operator but for parsing purpose.


FUNC

public static final Operator.Type FUNC
Function operator. Not a real operator but for parsing purpose.


COMMA

public static final Operator.Type COMMA
Argument separator. Not a real operator but for parsing purpose.

Method Detail

values

public static Operator.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Operator.Type c : Operator.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Operator.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getPrecedence

public int getPrecedence()
Returns the precedence of this operator. The lower the number, the higher the precedence.


getArgumentNumber

public int getArgumentNumber()
Returns the number arguments that this operator expects.


getName

public java.lang.String getName()
Returns the name of this operator.


invoke

public java.lang.Object invoke(java.lang.Object... args)
Invokes the operator. The number of arguments must match the operator. For example, for a unary operator, the number shall be 1.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<Operator.Type>


Copyright © 2005-2010 Potix Corporation. All Rights Reserved.