Integer Operations

The Expression Language provides a number of operators that act on Integers:
  • The comparison operators, which result in a value of type Boolean:

    • Numerical Comparison Operators (<, <=, >, and >=)

    • Numeric Equality Operators (== and !=)

  • The numerical operators, which result in a value of type int or long or BigInteger:

    • Unary Plus Operator (+) and Unary Minus Operator (-)

    • Multiplicative Operators (*, /, and %)

    • Additive Operators (+ and -) for Numeric Types

    • Prefix Increment Operator (++) and Postfix Increment Operator (++)

    • Prefix Decrement Operator (--) and Postfix Decrement Operator (-)

    • Shift Operators (<<, >>, and >>>)

    • Bitwise Complement Operator (~)

    • Integer Bitwise Operators (&, ^, and |)

  • Conditional Operator (? :)

  • Field Access Using a Primary

  • Method Invocation Expressions

  • The cast operator, which can convert from an integral value or a string value to a value of any specified numeric type

The semantics of arithmetic operations exactly mimic those of Java’s Integer arithmetic operators, as defined in The Java Language Specification. See the following for a summary descriptive list of all the operators you can use in the Java language:

http://java.sun.com/docs/books/tutorial/java/nutsandbolts/opsummary.html