Package org.pentaho.reporting.libraries.formula.lvalues

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


            }
        }
        final LValue[] childValues = lValue.getChildValues();
        for (int i = 0; i < childValues.length; i++)
        {
            final LValue value = childValues[i];
            if (isReferenceChanged(value))
            {
                return true;
            }
        }
View Full Code Here


        }

        try
        {
            final Formula formula = formulaExpression.getCompiledFormula();
            final LValue lValue = formula.getRootReference();
            return isReferenceChanged(lValue);
        }
        catch (ParseException e)
        {
            return false;
View Full Code Here

      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 new EvaluationException(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

    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

    }

    // 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

    {
      throw new EvaluationException(LibFormulaErrorValue.ERROR_ARGUMENTS_VALUE);
    }
    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

      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 new EvaluationException(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)
        {
          last = next;
View Full Code Here

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

      rowCursor++;
      return new StaticValue(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

      throw new NullPointerException("Formula-text given must not be null.");
    }
    try
    {
      ReInit(new StringReader(formula));
      final LValue expression = getExpression();
      if (token.next != null && token.next.image.length() > 0)
      {
        throw new FormulaParseException("Extra content");
      }
      return expression;
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.formula.lvalues.LValue

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.