com.espertech.esper.type
Enum MathArithTypeEnum

java.lang.Object
  extended by java.lang.Enum<MathArithTypeEnum>
      extended by com.espertech.esper.type.MathArithTypeEnum
All Implemented Interfaces:
Serializable, Comparable<MathArithTypeEnum>

public enum MathArithTypeEnum
extends Enum<MathArithTypeEnum>

Enumeration for the type of arithmatic to use.


Nested Class Summary
static class MathArithTypeEnum.AddDouble
          Computer for type-specific arith.
static class MathArithTypeEnum.AddFloat
          Computer for type-specific arith.
static class MathArithTypeEnum.AddInt
          Computer for type-specific arith.
static class MathArithTypeEnum.AddLong
          Computer for type-specific arith.
static interface MathArithTypeEnum.Computer
          Interface for number cruncher.
static class MathArithTypeEnum.DivideDouble
          Computer for type-specific arith.
static class MathArithTypeEnum.DivideFloat
          Computer for type-specific arith.
static class MathArithTypeEnum.DivideInt
          Computer for type-specific arith.
static class MathArithTypeEnum.DivideLong
          Computer for type-specific arith.
static class MathArithTypeEnum.ModuloDouble
          Computer for type-specific arith.
static class MathArithTypeEnum.ModuloFloat
          Computer for type-specific arith.
static class MathArithTypeEnum.ModuloInt
          Computer for type-specific arith.
static class MathArithTypeEnum.ModuloLong
          Computer for type-specific arith.
static class MathArithTypeEnum.MultiplyDouble
          Computer for type-specific arith.
static class MathArithTypeEnum.MultiplyFloat
          Computer for type-specific arith.
static class MathArithTypeEnum.MultiplyInt
          Computer for type-specific arith.
static class MathArithTypeEnum.MultiplyLong
          Computer for type-specific arith.
static class MathArithTypeEnum.SubtractDouble
          Computer for type-specific arith.
static class MathArithTypeEnum.SubtractFloat
          Computer for type-specific arith.
static class MathArithTypeEnum.SubtractInt
          Computer for type-specific arith.
static class MathArithTypeEnum.SubtractLong
          Computer for type-specific arith.
 
Enum Constant Summary
ADD
          Plus.
DIVIDE
          Divide.
MODULO
          Modulo.
MULTIPLY
          Multiply.
SUBTRACT
          Minus.
 
Method Summary
 MathArithTypeEnum.Computer getComputer(Class coercedType)
          Returns number cruncher for the target coercion type.
 String getExpressionText()
          Returns string representation of enum.
static MathArithTypeEnum parseOperator(String operator)
          Returns the math operator for the string.
static MathArithTypeEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MathArithTypeEnum[] 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 MathArithTypeEnum ADD
Plus.


SUBTRACT

public static final MathArithTypeEnum SUBTRACT
Minus.


DIVIDE

public static final MathArithTypeEnum DIVIDE
Divide.


MULTIPLY

public static final MathArithTypeEnum MULTIPLY
Multiply.


MODULO

public static final MathArithTypeEnum MODULO
Modulo.

Method Detail

values

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

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

valueOf

public static MathArithTypeEnum 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 MathArithTypeEnum.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

parseOperator

public static MathArithTypeEnum parseOperator(String operator)
Returns the math operator for the string.

Parameters:
operator - to parse
Returns:
math enum

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com