Examples of LValue


Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

  public static boolean isValidFormulaFragment(final String formula)
  {
    try
    {
      final FormulaParser parser = new FormulaParser();
      final LValue lValue = parser.parse(formula);
      return true;
    }
    catch (Exception e)
    {
      return false;
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

  public static String createCellUITextFromFormula(final String formula, final FormulaContext context)
  {
    try
    {
      final FormulaParser parser = new FormulaParser();
      final LValue lValue = parser.parse(formula);
      lValue.initialize(context);

      if (lValue.isConstant())
      {
        if (lValue instanceof StaticValue)
        {
          final StaticValue staticValue = (StaticValue) lValue;
          final Object o = staticValue.getValue();
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

    ArgumentNullException.validate("fomulaContext", formulaContext);

    try
    {
      final FormulaParser parser = new FormulaParser();
      final LValue lValue = parser.parse(formula);
      lValue.initialize(formulaContext);
      if (lValue.isConstant())
      {
        if (lValue instanceof StaticValue)
        {
          final StaticValue staticValue = (StaticValue) lValue;
          final Object o = staticValue.getValue();
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

    for (; rowCursor < rowCount; rowCursor++)
    {
      for (; columnCursor < columnCount; columnCursor++)
      {
        final LValue value = array.getRaw(rowCursor, columnCursor);
        if (isValidNext(value))
        {
          return true;
        }
      }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

      rowCursor++;
      return single;
    }
    else if (array != null)
    {
      final LValue raw = array.getRaw(rowCursor, columnCursor);
      // advance
      if (columnCursor == array.getColumnCount() - 1)
      {
        rowCursor++;
        columnCursor = 0;
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

    int count = 0;

    final Object value = parameters.getValue(0);
    final Type type = parameters.getType(0);
    final LValue raw = parameters.getRaw(0);

    if (raw instanceof ContextLookup)
    {
      if (value != null)
      {
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

    }

    // we want error values propagated so we need to evaluate the parameter
    parameters.getValue(0);

    final LValue raw = parameters.getRaw(0);
    if (raw instanceof ContextLookup)
    {
      return RETURN_TRUE;
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_ARGUMENTS_VALUE);
    }
    try
    {
      final Object value = parameters.getValue(0);
      final LValue raw = parameters.getRaw(0);
      if (raw instanceof ContextLookup)
      {
        if (value == null)
        {
          return RETURN_TRUE;
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

      final Object value = parameters.getValue(paramIdx);
      final Sequence sequence = typeRegistry.convertToNumberSequence(type, value, isStrictSequenceNeeded());

      while (sequence.hasNext())
      {
        final LValue rawValue = sequence.nextRawValue();
        if (rawValue == null)
        {
          throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
        }
        final TypeValuePair nextValue = rawValue.evaluate();
        final Number number = typeRegistry.convertToNumber(nextValue.getType(), nextValue.getValue());
        final BigDecimal next = NumberUtil.getAsBigDecimal(number);

        if(last == null)
        {
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.LValue

        try
        {
            final FormattedTextElement element = (FormattedTextElement) getNode();
            final FormulaExpression formulaExpression = element.getValueExpression();
            final Formula formula = formulaExpression.getCompiledFormula();
            final LValue lValue = formula.getRootReference();
            return isReferenceChanged(lValue);
        }
        catch (final ParseException e)
        {
            LOGGER.debug("Parse Exception", e);
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.