net.esper.type
Enum ArithTypeEnum

java.lang.Object
  extended by java.lang.Enum<ArithTypeEnum>
      extended by net.esper.type.ArithTypeEnum
All Implemented Interfaces:
Serializable, Comparable<ArithTypeEnum>

public enum ArithTypeEnum
extends Enum<ArithTypeEnum>

Enumeration for the type of arithmatic to use.


Nested Class Summary
static class ArithTypeEnum.AddDouble
          Computer for type-specific arith.
static class ArithTypeEnum.AddFloat
          Computer for type-specific arith.
static class ArithTypeEnum.AddInt
          Computer for type-specific arith.
static class ArithTypeEnum.AddLong
          Computer for type-specific arith.
static interface ArithTypeEnum.Computer
          Interface for number cruncher.
static class ArithTypeEnum.DivideDouble
          Computer for type-specific arith.
static class ArithTypeEnum.DivideFloat
          Computer for type-specific arith.
static class ArithTypeEnum.DivideInt
          Computer for type-specific arith.
static class ArithTypeEnum.DivideLong
          Computer for type-specific arith.
static class ArithTypeEnum.ModuloDouble
          Computer for type-specific arith.
static class ArithTypeEnum.ModuloFloat
          Computer for type-specific arith.
static class ArithTypeEnum.ModuloInt
          Computer for type-specific arith.
static class ArithTypeEnum.ModuloLong
          Computer for type-specific arith.
static class ArithTypeEnum.MultiplyDouble
          Computer for type-specific arith.
static class ArithTypeEnum.MultiplyFloat
          Computer for type-specific arith.
static class ArithTypeEnum.MultiplyInt
          Computer for type-specific arith.
static class ArithTypeEnum.MultiplyLong
          Computer for type-specific arith.
static class ArithTypeEnum.SubtractDouble
          Computer for type-specific arith.
static class ArithTypeEnum.SubtractFloat
          Computer for type-specific arith.
static class ArithTypeEnum.SubtractInt
          Computer for type-specific arith.
static class ArithTypeEnum.SubtractLong
          Computer for type-specific arith.
 
Enum Constant Summary
ADD
          Plus.
DIVIDE
          Divide.
MODULO
          Modulo.
MULTIPLY
          Multiply.
SUBTRACT
          Minus.
 
Method Summary
 ArithTypeEnum.Computer getComputer(Class coercedType)
          Returns number cruncher for the target coercion type.
 String getExpressionText()
          Returns string representation of enum.
static ArithTypeEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ArithTypeEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADD

public static final ArithTypeEnum ADD
Plus.


SUBTRACT

public static final ArithTypeEnum SUBTRACT
Minus.


DIVIDE

public static final ArithTypeEnum DIVIDE
Divide.


MULTIPLY

public static final ArithTypeEnum MULTIPLY
Multiply.


MODULO

public static final ArithTypeEnum MODULO
Modulo.

Method Detail

values

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

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

valueOf

public static ArithTypeEnum 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

getComputer

public ArithTypeEnum.Computer getComputer(Class coercedType)
Returns number cruncher for the target coercion type.

Parameters:
coercedType - - target type
Returns:
number cruncher

getExpressionText

public String getExpressionText()
Returns string representation of enum.

Returns:
text for enum