Class DefaultEvaluationValueConverter
- java.lang.Object
-
- com.ezylang.evalex.data.conversion.DefaultEvaluationValueConverter
-
- All Implemented Interfaces:
EvaluationValueConverterIfc
public class DefaultEvaluationValueConverter extends java.lang.Object implements EvaluationValueConverterIfc
The default implementation of theEvaluationValueConverterIfc, used in the standard configuration.
* Be careful with conversion problems when using float or double, which are fractional numbers. A (float)0.1 is e.g. converted to 0.10000000149011612Input type Converter used BigDecimal NumberConverter Long, long NumberConverter Integer, int NumberConverter Short, short NumberConverter Byte, byte NumberConverter Double, double NumberConverter * Float, float NumberConverter * CharSequence , String StringConverter Boolean, boolean BooleanConverter Instant DateTimeConverter Date DateTimeConverter Calendar DateTimeConverter ZonedDateTime DateTimeConverter LocalDate DateTimeConverter - the configured zone ID will be used for conversion LocalDateTime DateTimeConverter - the configured zone ID will be used for conversion OffsetDateTime DateTimeConverter Duration DurationConverter ASTNode ASTNode List<?> ArrayConverter - each entry will be converted Map<?,?> StructureConverter - each entry will be converted
-
-
Constructor Summary
Constructors Constructor Description DefaultEvaluationValueConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationValueconvertObject(java.lang.Object object, ExpressionConfiguration configuration)Called whenever an object has to be converted to anEvaluationValue.
-
-
-
Method Detail
-
convertObject
public EvaluationValue convertObject(java.lang.Object object, ExpressionConfiguration configuration)
Description copied from interface:EvaluationValueConverterIfcCalled whenever an object has to be converted to anEvaluationValue.- Specified by:
convertObjectin interfaceEvaluationValueConverterIfc- Parameters:
object- The object holding the value.configuration- The configuration to use.- Returns:
- The converted
EvaluationValue.
-
-