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:
java.io.Serializable, java.lang.Comparable<MathArithTypeEnum>

public enum MathArithTypeEnum
extends java.lang.Enum<MathArithTypeEnum>

Enumeration for the type of arithmatic to use.


Nested Class Summary
static class MathArithTypeEnum.AddBigDec
          Computer for type-specific arith.
static class MathArithTypeEnum.AddBigDecConvComputer
          Computer for math op.
static class MathArithTypeEnum.AddBigInt
          Computer for type-specific arith.
static class MathArithTypeEnum.AddBigIntConvComputer
          Computer for math op.
static class MathArithTypeEnum.AddByte
          Computer for type-specific arith.
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 class MathArithTypeEnum.AddShort
          Computer for type-specific arith.
static interface MathArithTypeEnum.Computer
          Interface for number cruncher.
static class MathArithTypeEnum.DivideBigDec
          Computer for type-specific arith.
static class MathArithTypeEnum.DivideBigDecConvComputer
          Computer for math op.
static class MathArithTypeEnum.DivideBigDecWMathContext
          Computer for type-specific arith.
static class MathArithTypeEnum.DivideBigInt
          Computer for type-specific arith.
static class MathArithTypeEnum.DivideBigIntConvComputer
          Computer for math op.
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.MultiplyBigDec
          Computer for type-specific arith.
static class MathArithTypeEnum.MultiplyBigDecConvComputer
          Computer for math op.
static class MathArithTypeEnum.MultiplyBigInt
          Computer for type-specific arith.
static class MathArithTypeEnum.MultiplyBigIntConvComputer
          Computer for math op.
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.SubtractBigDec
          Computer for type-specific arith.
static class MathArithTypeEnum.SubtractBigDecConvComputer
          Computer for math op.
static class MathArithTypeEnum.SubtractBigInt
          Computer for type-specific arith.
static class MathArithTypeEnum.SubtractBigIntConvComputer
          Computer for math op.
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(java.lang.Class coercedType, java.lang.Class typeOne, java.lang.Class typeTwo, boolean isIntegerDivision, boolean isDivisionByZeroReturnsNull, java.math.MathContext optionalMathContext)
          Returns number cruncher for the target coercion type.
 java.lang.String getExpressionText()
          Returns string representation of enum.
static MathArithTypeEnum parseOperator(java.lang.String operator)
          Returns the math operator for the string.
static MathArithTypeEnum valueOf(java.lang.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 are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
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 MathArithTypeEnum[] 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 (MathArithTypeEnum c : MathArithTypeEnum.values())
    System.out.println(c);

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

valueOf

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

getComputer

public MathArithTypeEnum.Computer getComputer(java.lang.Class coercedType,
                                              java.lang.Class typeOne,
                                              java.lang.Class typeTwo,
                                              boolean isIntegerDivision,
                                              boolean isDivisionByZeroReturnsNull,
                                              java.math.MathContext optionalMathContext)
Returns number cruncher for the target coercion type.

Parameters:
coercedType - - target type
typeOne - - the LHS type
typeTwo - - the RHS type
isIntegerDivision - - false for division returns double, true for using Java-standard integer division
isDivisionByZeroReturnsNull - - false for division-by-zero returns infinity, true for null
Returns:
number cruncher

getExpressionText

public java.lang.String getExpressionText()
Returns string representation of enum.

Returns:
text for enum

parseOperator

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

Parameters:
operator - to parse
Returns:
math enum

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com