Package org.jfree.formula.lvalues

Examples of org.jfree.formula.lvalues.TypeValuePair


      formula.initialize(context);
    } catch (EvaluationException e)
    {
      Assert.fail("Initialization Error", e);
    }
    final TypeValuePair evaluation = formula.evaluateTyped();
    Assert.assertNotNull(evaluation);
    Assert.assertTrue(evaluation.getType().isFlagSet(Type.DATATABLE_TYPE));
   
    final DataTable table = (DataTable)evaluation.getValue();
    Assert.assertEquals(table.getColumnCount(), 1);
    Assert.assertEquals(table.getRowCount(), 3);
  }
View Full Code Here


      formula.initialize(context);
    } catch (EvaluationException e)
    {
      Assert.fail("Initialization Error", e);
    }
    final TypeValuePair evaluation = formula.evaluateTyped();
    Assert.assertNotNull(evaluation);
    Assert.assertTrue(evaluation.getType().isFlagSet(Type.DATATABLE_TYPE));
   
    final DataTable table = (DataTable)evaluation.getValue();
    Assert.assertEquals(table.getColumnCount(), 3);
    Assert.assertEquals(table.getRowCount(), 1);
  }
View Full Code Here

      formula.initialize(context);
    } catch (EvaluationException e)
    {
      Assert.fail("Initialization Error", e);
    }
    final TypeValuePair evaluation = formula.evaluateTyped();
    Assert.assertNotNull(evaluation);
    Assert.assertTrue(evaluation.getType().isFlagSet(Type.DATATABLE_TYPE));
   
    final DataTable table = (DataTable)evaluation.getValue();
    Assert.assertEquals(table.getColumnCount(), 3);
    Assert.assertEquals(table.getRowCount(), 2);
  }
View Full Code Here

    // return the same as zero minus value.
    final Number number = typeRegistry.convertToNumber(type, rawValue);
    final BigDecimal value = OperatorUtility.getAsBigDecimal(number);
    final BigDecimal divide = value.divide(HUNDRED, value.scale()+2,BigDecimal.ROUND_HALF_UP);
    return new TypeValuePair(type, divide);
  }
View Full Code Here

      throw new EvaluationException (LibFormulaErrorValue.ERROR_NA_VALUE);
    }

    final Number number1 = TypeRegistryUtility.convertToNumber(typeRegistry, value1.getType(), raw1, ZERO);
    final Number number2 = TypeRegistryUtility.convertToNumber(typeRegistry, value2.getType(), raw2, ZERO);
    return new TypeValuePair(NumberType.GENERIC_NUMBER, evaluate(number1, number2));
  }
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.