Package org.teiid.core.types.basic
Class NumberToFloatTransform
- java.lang.Object
-
- org.teiid.core.types.Transform
-
- org.teiid.core.types.basic.NumberToNumberTransform
-
- org.teiid.core.types.basic.NumberToFloatTransform
-
public class NumberToFloatTransform extends NumberToNumberTransform
-
-
Constructor Summary
Constructors Constructor Description NumberToFloatTransform(Class<?> sourceType, boolean isNarrowing, boolean isLossy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
getTargetType()
Type of the outgoing value.boolean
isExplicit()
Object
transformDirect(Object value)
This method transforms a value of the source type into a value of the target type.-
Methods inherited from class org.teiid.core.types.basic.NumberToNumberTransform
checkValueRange, getSourceType
-
Methods inherited from class org.teiid.core.types.Transform
getDescription, getDisplayName, getSourceTypeName, getTargetTypeName, toString, transform
-
-
-
-
Constructor Detail
-
NumberToFloatTransform
public NumberToFloatTransform(Class<?> sourceType, boolean isNarrowing, boolean isLossy)
-
-
Method Detail
-
transformDirect
public Object transformDirect(Object value) throws TransformationException
This method transforms a value of the source type into a value of the target type.- Specified by:
transformDirect
in classTransform
- Parameters:
value
- Incoming value of source type- Returns:
- Outgoing value of target type
- Throws:
TransformationException
- if value is an incorrect input type or the transformation fails
-
getTargetType
public Class<?> getTargetType()
Type of the outgoing value.- Specified by:
getTargetType
in classTransform
- Returns:
- Target type
-
isExplicit
public boolean isExplicit()
- Overrides:
isExplicit
in classTransform
-
-