|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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,
Object value)
|
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 sourceType,
Object value)
converts the object of the given type into a number. |
NumberSequence |
convertToNumberSequence(Type type,
Object value,
boolean strict)
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)
|
void |
initialize(org.pentaho.reporting.libraries.base.config.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 TypeRegistry
type1
- type2
-
public Number convertToNumber(Type sourceType, Object value) throws EvaluationException
convertToNumber
in interface TypeRegistry
sourceType
- value
-
NumberFormatException
- if the type cannot be represented as number.
TypeConversionException
- if the type cannot be represented as number.
EvaluationException
public void initialize(org.pentaho.reporting.libraries.base.config.Configuration configuration, FormulaContext formulaContext)
configuration
- formulaContext
- public void initialize(FormulaContext formulaContext)
public String convertToText(Type type1, Object value) throws EvaluationException
TypeRegistry
convertToText
in interface TypeRegistry
TypeConversionException
EvaluationException
public Boolean convertToLogical(Type type1, Object value) throws TypeConversionException
TypeRegistry
convertToLogical
in interface TypeRegistry
TypeConversionException
public Date convertToDate(Type type1, Object value) throws EvaluationException
TypeRegistry
convertToDate
in interface TypeRegistry
EvaluationException
public ArrayCallback convertToArray(Type type, Object value) throws EvaluationException
convertToArray
in interface TypeRegistry
EvaluationException
public Sequence convertToSequence(Type type, Object value) throws EvaluationException
convertToSequence
in interface TypeRegistry
EvaluationException
public NumberSequence convertToNumberSequence(Type type, Object value, boolean strict) throws EvaluationException
TypeRegistry
convertToNumberSequence
in interface TypeRegistry
TypeConversionException
EvaluationException
public TypeValuePair convertTo(Type targetType, TypeValuePair valuePair) throws EvaluationException
convertTo
in interface TypeRegistry
targetType
- valuePair
-
EvaluationException
public Type guessTypeOfObject(Object o)
guessTypeOfObject
in interface TypeRegistry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |