Class Coercion
java.lang.Object
com.aquima.interactions.expressions.coercion.Coercion
Utility class helping with type conversion etc.
Coercion is a term in compiler technology which states that type coercion is only possible to 'convert' a type to
another type without loss of data. All other type conversions which can result in data loss are NOT coercion.
- Since:
- 6.0
- Author:
- F. van der Meer
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isCoercableTo
(DataType currentType, DataType expectedType) Are the types convertable without losing information.
-
Method Details
-
isCoercableTo
Are the types convertable without losing information. (i.e. coercable).- Parameters:
currentType
- The type for which the conversion is requested.expectedType
- The type to which the conversions should take place.- Returns:
- true when the type can be coerced to the resulting type
-