Package org.jfree.formula.typing.sequence

Examples of org.jfree.formula.typing.sequence.NumberSequence


    // array
    if (type.isFlagSet(Type.ARRAY_TYPE))
    {
      if (value instanceof ArrayCallback)
      {
        return new NumberSequence((ArrayCallback) value, context);
      }
      else
      {
        throw new TypeConversionException();
      }
    }
    // else scalar
    if (type.isFlagSet(Type.SCALAR_TYPE) && type.isFlagSet(Type.NUMERIC_TYPE))
    {
      return new NumberSequence(convertToNumber(type, value), context);
    }
    else
    {
      throw new TypeConversionException();
    }
View Full Code Here


    for (int paramIdx = 0; paramIdx < parameterCount; paramIdx++)
    {
      final Type type = parameters.getType(paramIdx);
      final Object value = parameters.getValue(paramIdx);
      final NumberSequence sequence = context.getTypeRegistry().convertToNumberSequence(type, value);

      while (sequence.hasNext())
      {
        computedResult = compute(sequence.nextNumber(), computedResult);
      }
    }

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

    BigDecimal last = null;
    for (int paramIdx = 0; paramIdx < parameterCount; paramIdx++)
    {
      final Type type = parameters.getType(paramIdx);
      final Object value = parameters.getValue(paramIdx);
      final NumberSequence sequence = context.getTypeRegistry().convertToNumberSequence(type, value);

      while(sequence.hasNext())
      {
        final BigDecimal next = NumberUtil.getAsBigDecimal(sequence.nextNumber());
        if(last == null)
        {
          last = next;
        }
        else
View Full Code Here

    BigDecimal last = null;
    for (int paramIdx = 0; paramIdx < parameterCount; paramIdx++)
    {
      final Type type = parameters.getType(paramIdx);
      final Object value = parameters.getValue(paramIdx);
      final NumberSequence sequence = context.getTypeRegistry().convertToNumberSequence(type, value);

      while(sequence.hasNext())
      {
        final BigDecimal next = NumberUtil.getAsBigDecimal(sequence.nextNumber());
        if(last == null)
        {
          last = next;
        }
        else
View Full Code Here

TOP

Related Classes of org.jfree.formula.typing.sequence.NumberSequence

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.