org.pentaho.reporting.libraries.formula.typing
public class DefaultTypeRegistry extends Object implements TypeRegistry
Constructor Summary | |
---|---|
DefaultTypeRegistry() |
Method Summary | |
---|---|
TypeValuePair | convertTo(Type targetType, TypeValuePair valuePair)
Checks whether the target type would accept the specified value object and value type. This method is called for auto conversion of fonction parameters using the conversion type declared by the function metadata. |
Date | convertToDate(Type type1, Object value) |
Boolean | convertToLogical(Type type1, Object value) |
Number | convertToNumber(Type sourceType, Object value)
converts the object of the given type into a number. |
NumberSequence | convertToNumberSequence(Type type, Object value, boolean strict) |
Sequence | convertToSequence(Type type, Object value) |
String | convertToText(Type type1, Object value) |
ExtendedComparator | getComparator(Type type1, Type type2)
Returns an comparator for the given types.
|
protected NumberFormat | getDefaultNumberFormat() |
Type | guessTypeOfObject(Object o) |
void | initialize(Configuration configuration, FormulaContext formulaContext) |
void | initialize(FormulaContext formulaContext) |
protected NumberFormat[] | loadNumberFormats() |
Parameters: targetType valuePair
UNKNOWN: ObjectEquality is tested at the end of the method for performance reasons only. We just want to detect whether a new object has been created or not.
Parameters: sourceType value
Returns:
Throws: NumberFormatException if the type cannot be represented as number.
Parameters: type1 type2
Returns:
Deprecated: Use the single-argument function instead.
Parameters: configuration formulaContext