Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Change from a.unaryMinus() to a.negative(), a.unaryPlus() to a.positive()

...

Operator

Method

a + b

a.plus(b)

a - b

a.minus(b)

a * b

a.multiply(b)

a ** b

a.power(b)

a / b

a.div(b)

a % b

a.mod(b)

a | b

a.or(b)

a & b

a.and(b)

a ^ b

a.xor(b)

a++ or ++a

a.next()

a-- or --a

a.previous()

a[b]

a.getAt(b)

a[b] = c

a.putAt(b, c)

a << b

a.leftShift(b)

a >> b

a.rightShift(b)

switch(a) { case(b) : }

b.isCase(a)

~a

a.bitwiseNegate()

-a

a.unaryMinusnegative()

+a

a.unaryPluspositive()

Note that all the following comparison operators handle nulls gracefully avoiding the throwing of java.lang.NullPointerException

...