Package com.odiago.flumebase.lang

Examples of com.odiago.flumebase.lang.EvalException


      if (state.mSum instanceof Integer) {
        state.mSum = PreciseType.toPreciseType(type).parseStringInput("0");
      }
      state.mSum = ((BigDecimal) state.mSum).add((BigDecimal) num);
    } else {
      throw new EvalException("Cannot take sum over type: " + num.getClass().getName());
    }
  }
View Full Code Here


        return totalWeight.divide(BigDecimal.valueOf(totalCount));
      } else {
        return null;
      }
    } else {
      throw new EvalException("Don't know how to aggregate with type: " + type);
    }
  }
View Full Code Here

      return Double.valueOf(d * d);
    } else if (arg0 instanceof BigDecimal) {
      BigDecimal bd = (BigDecimal) arg0;
      return bd.multiply(bd);
    } else {
      throw new EvalException("Cannot square value of type : " + arg0.getClass().getName());
    }
  }
View Full Code Here

    } else if (type.getPrimitiveTypeName().equals(Type.TypeName.DOUBLE)) {
      bucket.setState(state.doubleValue() + num.doubleValue());
    } else if (type.getPrimitiveTypeName().equals(Type.TypeName.PRECISE)) {
      bucket.setState(((BigDecimal) state).add((BigDecimal) num));
    } else {
      throw new EvalException("Cannot take sum over type: " + num.getClass().getName());
    }
  }
View Full Code Here

        return total;
      } else {
        return null;
      }
    } else {
      throw new EvalException("Don't know how to aggregate with type: " + type);
    }
  }
View Full Code Here

TOP

Related Classes of com.odiago.flumebase.lang.EvalException

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.