Class IntegralType
- java.lang.Object
-
- com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.Type
-
- com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.PrimitiveType
-
- com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.NumericType
-
- com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.IntegralType
-
- All Implemented Interfaces:
NumberType
public class IntegralType extends NumericType
This class represents the types byte, short int, long and char- Version:
- 0.1
- Author:
- Michael Bouschen
-
-
Constructor Summary
Constructors Constructor Description IntegralType(String name, Class clazz, int enumType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Number
getValue(Number value)
Converts the specified value into a value of this numeric type.Number
negate(Number value)
Returns -value.-
Methods inherited from class com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.NumericType
isOrderable
-
Methods inherited from class com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.PrimitiveType
getWrapper, isCompatibleWith, setWrapper
-
Methods inherited from class com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.Type
equals, getEnumType, getJavaClass, getName, toString
-
-
-
-
Method Detail
-
getValue
public Number getValue(Number value)
Converts the specified value into a value of this numeric type. E.g. an Integer is converted into a Long, if this represents the numeric type long.- Specified by:
getValue
in interfaceNumberType
- Specified by:
getValue
in classNumericType
- Parameters:
value
- value to be converted- Returns:
- converted value
-
negate
public Number negate(Number value)
Returns -value.- Specified by:
negate
in interfaceNumberType
- Specified by:
negate
in classNumericType
- Parameters:
value
- value to be negated- Returns:
- -value
-
-