Package org.jfree.formula.lvalues

Examples of org.jfree.formula.lvalues.TypeValuePair


        if (parameters.getParameterCount() != 0)
        {
            throw new EvaluationException(LibFormulaErrorValue.ERROR_ARGUMENTS_VALUE);
        }

        return new TypeValuePair(TextType.TYPE, context.getConfiguration().getConfigProperty(ReportEngineParameterNames.AUTHOR));
    }
View Full Code Here


        if (parameters.getParameterCount() != 0)
        {
            throw new EvaluationException(LibFormulaErrorValue.ERROR_ARGUMENTS_VALUE);
        }

        return new TypeValuePair(TextType.TYPE, context.getConfiguration().getConfigProperty(ReportEngineParameterNames.TITLE));
    }
View Full Code Here

      }
      else
      {
        final Object retval = convertPlainToPlain(targetType, valuePair
            .getType(), valuePair.getValue());
        return new TypeValuePair(targetType, new Object[]
        { retval });
      }
    }

    final Object value = valuePair.getValue();
    final Object o = convertPlainToPlain(targetType, valuePair.getType(), value);
    if (value == o)
    {
      return valuePair;
    }
    return new TypeValuePair(targetType, o);
  }
View Full Code Here

      {
        return null;
      }
      target[i] = converted;
    }
    return new TypeValuePair(targetType, target);
  }
View Full Code Here

  {
    final LocalizationContext localizationContext = context.getLocalizationContext();
    final Date now = DateUtil.now(localizationContext);

    final Date date = DateUtil.normalizeDate(now, DateTimeType.DATETIME_TYPE);
    return new TypeValuePair(DateTimeType.DATETIME_TYPE, date);
  }
View Full Code Here

    final Object indexValue = parameters.getValue(0);

    final int index= context.getTypeRegistry().convertToNumber(indexType, indexValue).intValue();
    if(index >= 1 && index < parameters.getParameterCount())
    {
      return new TypeValuePair(parameters.getType(index), parameters.getValue(index));
    }
    // else
    throw new EvaluationException(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
  }
View Full Code Here

    final Calendar gc = DateUtil.createCalendar(d, context
        .getLocalizationContext());

    final int year = gc
            .get(Calendar.YEAR);
    return new TypeValuePair(NumberType.GENERIC_NUMBER, new Integer(year));
  }
View Full Code Here

      {
        ret = new Integer(intValue + 1);
      }
    }

    return new TypeValuePair(NumberType.GENERIC_NUMBER, ret);
  }
View Full Code Here

    final Calendar gc = DateUtil.createCalendar(d, context
        .getLocalizationContext());

    int dayOfWeek = gc.get(Calendar.DAY_OF_WEEK);
    // in java Sunday = 1 (= Type 1 of openformula)
    return new TypeValuePair(NumberType.GENERIC_NUMBER, new Integer(
        convertType(dayOfWeek, type)));
  }
View Full Code Here

    final Type type1 = parameters.getType(0);
    final Object value1 = parameters.getValue(0);
    final Number result = context.getTypeRegistry().convertToNumber(type1, value1);

    final BigDecimal num = new BigDecimal(result.toString());
    return new TypeValuePair(NumberType.GENERIC_NUMBER, num.abs());
  }
View Full Code Here

TOP

Related Classes of org.jfree.formula.lvalues.TypeValuePair

Copyright © 2018 www.massapicom. 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.