|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.reporting.libraries.formula.typing.DefaultTypeRegistry
public class DefaultTypeRegistry
Creation-Date: 02.11.2006, 12:46:08
| 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. |
ArrayCallback |
convertToArray(Type type,
java.lang.Object value)
|
java.util.Date |
convertToDate(Type type1,
java.lang.Object value)
Converts the object of the given type into a date. |
java.lang.Boolean |
convertToLogical(Type type1,
java.lang.Object value)
Converts the object of the given type into a boolean. |
java.lang.Number |
convertToNumber(Type sourceType,
java.lang.Object value)
converts the object of the given type into a number. |
NumberSequence |
convertToNumberSequence(Type type,
java.lang.Object value,
boolean strict)
Converts the given (type,value) pair into a numeric sequence. |
Sequence |
convertToSequence(Type type,
java.lang.Object value)
|
java.lang.String |
convertToText(Type type1,
java.lang.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(java.lang.Object o)
|
void |
initialize(Configuration configuration,
FormulaContext formulaContext)
Deprecated. Use the single-argument function instead. |
void |
initialize(FormulaContext formulaContext)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultTypeRegistry()
| Method Detail |
|---|
public ExtendedComparator getComparator(Type type1,
Type type2)
getComparator in interface TypeRegistrytype1 - type2 -
public java.lang.Number convertToNumber(Type sourceType,
java.lang.Object value)
throws EvaluationException
convertToNumber in interface TypeRegistrysourceType - value -
java.lang.NumberFormatException - if the type cannot be represented as number.
TypeConversionException - if the type cannot be represented as number.
EvaluationException
public void initialize(Configuration configuration,
FormulaContext formulaContext)
configuration - formulaContext - public void initialize(FormulaContext formulaContext)
public java.lang.String convertToText(Type type1,
java.lang.Object value)
throws EvaluationException
TypeRegistry
convertToText in interface TypeRegistryTypeConversionException
EvaluationException
public java.lang.Boolean convertToLogical(Type type1,
java.lang.Object value)
throws TypeConversionException
TypeRegistry
convertToLogical in interface TypeRegistryTypeConversionException
public java.util.Date convertToDate(Type type1,
java.lang.Object value)
throws EvaluationException
TypeRegistry
convertToDate in interface TypeRegistryEvaluationException
public ArrayCallback convertToArray(Type type,
java.lang.Object value)
throws EvaluationException
convertToArray in interface TypeRegistryEvaluationException
public Sequence convertToSequence(Type type,
java.lang.Object value)
throws EvaluationException
convertToSequence in interface TypeRegistryEvaluationException
public NumberSequence convertToNumberSequence(Type type,
java.lang.Object value,
boolean strict)
throws EvaluationException
TypeRegistry
convertToNumberSequence in interface TypeRegistryTypeConversionException
EvaluationException
public TypeValuePair convertTo(Type targetType,
TypeValuePair valuePair)
throws EvaluationException
convertTo in interface TypeRegistrytargetType - valuePair -
EvaluationExceptionpublic Type guessTypeOfObject(java.lang.Object o)
guessTypeOfObject in interface TypeRegistry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||