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

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


    throw new Error("Missing return statement in function");
  }

  final public LValue getLValue() throws ParseException {
  Token value = null;
  LValue retval = null;
  PrefixOperator prefixOp = null;
  PostfixOperator postfixOp = null;
    switch (jj_nt.kind) {
    case PLUS:
    case MINUS:
View Full Code Here


    throw new Error("Missing return statement in function");
  }

  final public LValue[] parseRow() throws ParseException {
        ArrayList cols = new ArrayList();;
        LValue column = null;
    column = getExpression();
        cols.add(column);
    label_3:
    while (true) {
      switch (jj_nt.kind) {
View Full Code Here

    throw new Error("Missing return statement in function");
  }

  final public LValue parseFunction(String name, ParsePosition parsePosition) throws ParseException {
   ArrayList params = new ArrayList();
   LValue parameter = null;
   Token value = null;
   boolean parameterExpected = false;
    switch (jj_nt.kind) {
    case UNSIGNED_INTEGER:
    case SEMICOLON:
View Full Code Here

    if (formula == null)
    {
      throw new NullPointerException();
    }
    final LinkedHashMap<String,Boolean> map = new LinkedHashMap<String, Boolean>();
    final LValue lValue = formula.getRootReference();
    collectReferences(lValue, map);
    return map.keySet().toArray(new String[map.size()]);
  }
View Full Code Here

    {
      final Term t = (Term) lval;
      final LValue[] childValues = t.getChildValues();
      for (int i = 0; i < childValues.length; i++)
      {
        final LValue childValue = childValues[i];
        collectReferences(childValue, map);
      }
    }
    else if (lval instanceof ContextLookup)
    {
View Full Code Here

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

  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

  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

    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

    for (; rowCursor < rowCount; rowCursor++)
    {
      for (; columnCursor < columnCount; columnCursor++)
      {
        final LValue value = array.getRaw(rowCursor, columnCursor);
        if (isValidNext(value))
        {
          return true;
        }
      }
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.