org.pentaho.reporting.libraries.formula.typing
public interface TypeRegistry
Method Summary | |
---|---|
TypeValuePair | convertTo(Type targetType, TypeValuePair valuePair)
Checks whether the target type would accept the specified value object and value type. |
Date | convertToDate(Type type1, Object value)
Converts the object of the given type into a date.
|
Boolean | convertToLogical(Type type1, Object value)
Converts the object of the given type into a boolean.
|
Number | convertToNumber(Type type1, Object value)
Converts the object of the given type into a number. |
NumberSequence | convertToNumberSequence(Type type, Object value, boolean strictTypeChecks)
Converts the given (type,value) pair into a numeric sequence. |
Sequence | convertToSequence(Type type, Object value) |
String | convertToText(Type type1, Object value)
(This conversion is used by the operator implementations.)
|
ExtendedComparator | getComparator(Type type1, Type type2)
Returns an comparator for the given types.
|
Type | guessTypeOfObject(Object o) |
Parameters: targetType valuePair
Parameters: type1 value
Returns: The value as Date or null.
Parameters: type1 value
Returns: The value as Boolean or null.
Parameters: type1 value
Returns: the value as number or ZERO if the value is unconvertible.
Throws: TypeConversionException if the type cannot be represented as number.
Parameters: type value strictTypeChecks
Returns:
Throws: TypeConversionException
Parameters: type1 value
Returns: the value as string or an empty string, if the value given is null.
Throws: TypeConversionException
Parameters: type1 type2
Returns: