Interface SimpleNumberCoercer
- All Known Implementing Classes:
SimpleNumberCoercerFactory.SimpleNumberCoercerBigDecDouble
,SimpleNumberCoercerFactory.SimpleNumberCoercerBigDecLong
,SimpleNumberCoercerFactory.SimpleNumberCoercerBigInt
,SimpleNumberCoercerFactory.SimpleNumberCoercerByte
,SimpleNumberCoercerFactory.SimpleNumberCoercerDouble
,SimpleNumberCoercerFactory.SimpleNumberCoercerFloat
,SimpleNumberCoercerFactory.SimpleNumberCoercerInt
,SimpleNumberCoercerFactory.SimpleNumberCoercerLong
,SimpleNumberCoercerFactory.SimpleNumberCoercerShort
public interface SimpleNumberCoercer
Interface for number coercion.
-
Method Summary
Modifier and TypeMethodDescriptioncoerceBoxed
(Number numToCoerce) Coerce the given number to a previously determined type, assuming the type is a Boxed type.coerceCodegen
(CodegenExpression value, EPTypeClass valueType) coerceCodegenMayNullBoxed
(CodegenExpression value, EPType valueTypeMustNumeric, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope)
-
Method Details
-
coerceBoxed
Coerce the given number to a previously determined type, assuming the type is a Boxed type. Allows coerce to lower resultion number. Does't coerce to primitive types.- Parameters:
numToCoerce
- is the number to coerce to the given type- Returns:
- the numToCoerce as a value in the given result type
-
getReturnType
EPTypeClass getReturnType() -
coerceCodegen
-
coerceCodegenMayNullBoxed
CodegenExpression coerceCodegenMayNullBoxed(CodegenExpression value, EPType valueTypeMustNumeric, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope)
-