Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.modeshape.jcr.query.model
Enum ArithmeticOperator

    java.lang.Object
      java.lang.Enum<ArithmeticOperator>
          org.modeshape.jcr.query.model.ArithmeticOperator

All Implemented Interfaces:
  Serializable, Comparable<ArithmeticOperator>

    public enum ArithmeticOperator

extends Enum<ArithmeticOperator>

The arithmetic operators.

Nested Class Summary
`static class` | `ArithmeticOperator.Arity`

Enum Constant Summary
`ADD`
`DIVIDE`
`MULTIPLY`
`SUBTRACT`

Method Summary
`ArithmeticOperator.Arity` | `arity()` Get the 'arity' of the operator.
`static ArithmeticOperator` | `forSymbol(String symbol)` Attempt to find the Operator given a symbol.
`boolean` | `isBinary()` Return whether this is an binary operator.
`boolean` | `isUnary()` Return whether this is an unary operator.
`boolean` | `precedes(ArithmeticOperator operator)` Determine whether this operator has a higher precedence than the supplied operator.
`String` | `symbol()` Get the symbol for this operator
`String` | `toString()`
`static ArithmeticOperator` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static ArithmeticOperator[]` | `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

### ADD

    public static final ArithmeticOperator ADD

### SUBTRACT

    public static final ArithmeticOperator SUBTRACT

### MULTIPLY

    public static final ArithmeticOperator MULTIPLY

### DIVIDE

    public static final ArithmeticOperator DIVIDE

Method Detail

### values

    public static ArithmeticOperator[] 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 (ArithmeticOperator c : ArithmeticOperator.values())
          System.out.println(c);

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

### valueOf

    public static ArithmeticOperator valueOf(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:
    `IllegalArgumentException` - if this enum type has no constant with the specified name
    `NullPointerException` - if the argument is null

### symbol

    public String symbol()

  Get the symbol for this operator

  Returns:
    the symbolic representation; never null

### arity

    public ArithmeticOperator.Arity arity()

  Get the 'arity' of the operator.

  Returns:
    the number of parameters required
  See Also:
    `isUnary()`, `isBinary()`

### isUnary

    public boolean isUnary()

  Return whether this is an unary operator.

  Returns:
    true if this operator is unary, or false otherwise
  See Also:
    `arity()`, `isBinary()`

### isBinary

    public boolean isBinary()

  Return whether this is an binary operator.

  Returns:
    true if this operator is binary, or false otherwise
  See Also:
    `arity()`, `isUnary()`

### precedes

    public boolean precedes(ArithmeticOperator operator)

  Determine whether this operator has a higher precedence than the supplied operator.

  Parameters:
    `operator` - the other operator; may not be null
  Returns:
    true if this operator has a higher precedence, or false otherwise

### toString

    public String toString()

  Overrides:
    `toString` in class `Enum<ArithmeticOperator>`

### forSymbol

    public static ArithmeticOperator forSymbol(String symbol)

  Attempt to find the Operator given a symbol. The matching is done independent of case.

  Parameters:
    `symbol` - the symbol
  Returns:
    the Operator having the supplied symbol, or null if there is no Operator with the supplied symbol
  Throws:
    `IllegalArgumentException` - if the symbol is null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.