|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jfree.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. |
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 type1,
java.lang.Object value)
converts the object of the given type into a number. |
NumberSequence |
convertToNumberSequence(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. |
protected java.text.NumberFormat |
getDefaultNumberFormat()
|
Type |
guessTypeOfObject(java.lang.Object o)
|
void |
initialize(org.jfree.util.Configuration configuration,
FormulaContext formulaContext)
|
protected java.text.NumberFormat[] |
loadNumberFormats()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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 type1,
java.lang.Object value)
throws TypeConversionException
convertToNumber in interface TypeRegistrytype1 - value -
java.lang.NumberFormatException - if the type cannot be represented as number.
TypeConversionException - if the type cannot be represented as number.
public void initialize(org.jfree.util.Configuration configuration,
FormulaContext formulaContext)
protected java.text.NumberFormat[] loadNumberFormats()
public java.lang.String convertToText(Type type1,
java.lang.Object value)
throws TypeConversionException
TypeRegistry
convertToText in interface TypeRegistryTypeConversionException
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 TypeConversionException
TypeRegistry
convertToDate in interface TypeRegistryTypeConversionExceptionprotected java.text.NumberFormat getDefaultNumberFormat()
public NumberSequence convertToNumberSequence(Type type,
java.lang.Object value)
throws TypeConversionException
convertToNumberSequence in interface TypeRegistryTypeConversionException
public TypeValuePair convertTo(Type targetType,
TypeValuePair valuePair)
throws TypeConversionException
convertTo in interface TypeRegistrytargetType - valuePair -
TypeConversionExceptionpublic 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 | ||||||||