org.apache.expreval.expr
Enum NumericType

java.lang.Object
  extended by java.lang.Enum<NumericType>
      extended by org.apache.expreval.expr.NumericType
All Implemented Interfaces:
Serializable, Comparable<NumericType>

public enum NumericType
extends Enum<NumericType>


Enum Constant Summary
ByteType
           
DoubleType
           
FloatType
           
IntegerType
           
LongType
           
NumberType
           
ShortType
           
 
Method Summary
static Class getHighestRankingNumericArg(Object... vals)
           
static int getTypeRanking(Class clazz)
           
static boolean isAByte(Class clazz)
           
static boolean isADouble(Class clazz)
           
static boolean isAFloat(Class clazz)
           
static boolean isALong(Class clazz)
           
static boolean isAnInteger(Class clazz)
           
static boolean isANumber(Class clazz)
           
static boolean isAShort(Class clazz)
           
static boolean isAssignable(Class parentClass, Class childClass)
           
static boolean useDecimalNumericArgs(Class clazz)
           
static NumericType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static NumericType[] 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

ByteType

public static final NumericType ByteType

ShortType

public static final NumericType ShortType

IntegerType

public static final NumericType IntegerType

LongType

public static final NumericType LongType

FloatType

public static final NumericType FloatType

DoubleType

public static final NumericType DoubleType

NumberType

public static final NumericType NumberType
Method Detail

values

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

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

valueOf

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

getTypeRanking

public static int getTypeRanking(Class clazz)

isAssignable

public static boolean isAssignable(Class parentClass,
                                   Class childClass)

getHighestRankingNumericArg

public static Class getHighestRankingNumericArg(Object... vals)

useDecimalNumericArgs

public static boolean useDecimalNumericArgs(Class clazz)

isANumber

public static boolean isANumber(Class clazz)

isAByte

public static boolean isAByte(Class clazz)

isAShort

public static boolean isAShort(Class clazz)

isAnInteger

public static boolean isAnInteger(Class clazz)

isALong

public static boolean isALong(Class clazz)

isAFloat

public static boolean isAFloat(Class clazz)

isADouble

public static boolean isADouble(Class clazz)


Copyright © 2011. All Rights Reserved.