Package org.jfree.formula.typing

Examples of org.jfree.formula.typing.TypeRegistry.convertToText()


    final TypeRegistry typeRegistry = context.getTypeRegistry();

    final Type textType = parameters.getType(0);
    final Object textValue = parameters.getValue(0);

    final String text = typeRegistry.convertToText(textType, textValue);
    final int length;
    if(parameterCount == 2)
    {
      final Type lengthType = parameters.getType(1);
      final Object lengthValue = parameters.getValue(1);
View Full Code Here


    final Type textType = parameters.getType(0);
    final Object textValue = parameters.getValue(0);
    final Type oldTextType = parameters.getType(1);
    final Object oldTextValue = parameters.getValue(1);

    final String newText = typeRegistry.convertToText(newTextType, newTextValue);
    final String text = typeRegistry.convertToText(textType, textValue);
    final String oldText = typeRegistry.convertToText(oldTextType, oldTextValue);

    if (parameterCount == 3)
    {
View Full Code Here

    final Object textValue = parameters.getValue(0);
    final Type oldTextType = parameters.getType(1);
    final Object oldTextValue = parameters.getValue(1);

    final String newText = typeRegistry.convertToText(newTextType, newTextValue);
    final String text = typeRegistry.convertToText(textType, textValue);
    final String oldText = typeRegistry.convertToText(oldTextType, oldTextValue);

    if (parameterCount == 3)
    {
      int index = text.indexOf(oldText);
View Full Code Here

    final Type oldTextType = parameters.getType(1);
    final Object oldTextValue = parameters.getValue(1);

    final String newText = typeRegistry.convertToText(newTextType, newTextValue);
    final String text = typeRegistry.convertToText(textType, textValue);
    final String oldText = typeRegistry.convertToText(oldTextType, oldTextValue);

    if (parameterCount == 3)
    {
      int index = text.indexOf(oldText);
      if (index == -1)
View Full Code Here

    final Type textType1 = parameters.getType(0);
    final Object textValue1 = parameters.getValue(0);
    final Type countType = parameters.getType(1);
    final Object countValue = parameters.getValue(1);

    final String text1 = typeRegistry.convertToText(textType1, textValue1);
    final int count = typeRegistry.convertToNumber(countType, countValue).intValue();
    if(text1 == null && count >= 0)
    {
      throw new EvaluationException(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
    }
View Full Code Here

    final Type startType = parameters.getType(1);
    final Object startValue = parameters.getValue(1);
    final Type lengthType = parameters.getType(2);
    final Object lengthValue = parameters.getValue(2);

    final String newText = typeRegistry.convertToText(newTextType, newTextValue);
    final String text = typeRegistry.convertToText(textType, textValue);
    final Number start = typeRegistry.convertToNumber(startType, startValue);
    final Number length = typeRegistry.convertToNumber(lengthType, lengthValue);
   
    final MidFunction function = new MidFunction();
View Full Code Here

    final Object startValue = parameters.getValue(1);
    final Type lengthType = parameters.getType(2);
    final Object lengthValue = parameters.getValue(2);

    final String newText = typeRegistry.convertToText(newTextType, newTextValue);
    final String text = typeRegistry.convertToText(textType, textValue);
    final Number start = typeRegistry.convertToNumber(startType, startValue);
    final Number length = typeRegistry.convertToNumber(lengthType, lengthValue);
   
    final MidFunction function = new MidFunction();
    final String result1 = function.process(text, new Integer(1), new Integer(start.intValue() - 1));
View Full Code Here

    final TypeRegistry typeRegistry = context.getTypeRegistry();
    final Date date1 = typeRegistry.convertToDate
        (parameters.getType(0), parameters.getValue(0));
    final Date date2 = typeRegistry.convertToDate
        (parameters.getType(1), parameters.getValue(1));
    final String formatCode = typeRegistry.convertToText
        (parameters.getType(2), parameters.getValue(2));

    if (date1 == null || date2 == null || formatCode == null || "".equals(
        formatCode))
    {
View Full Code Here

    final TypeRegistry typeRegistry = context.getTypeRegistry();

    final Type textType = parameters.getType(0);
    final Object textValue = parameters.getValue(0);

    final String text = typeRegistry.convertToText(textType, textValue);
    final int length;
    if(parameterCount == 2)
    {
      final Number lengthVal = typeRegistry.convertToNumber(parameters.getType(1), parameters.getValue(1));
      if (lengthVal.doubleValue() < 0)
View Full Code Here

    final Type startType = parameters.getType(1);
    final Object startValue = parameters.getValue(1);
    final Type lengthType = parameters.getType(2);
    final Object lengthValue = parameters.getValue(2);

    final String text = typeRegistry.convertToText(textType, textValue);
    final Number start = typeRegistry.convertToNumber(startType, startValue);
    final Number length = typeRegistry.convertToNumber(lengthType, lengthValue);

    if(length.doubleValue() < 0 || start.doubleValue() < 1)
    {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.