List of usage examples for org.apache.commons.jxpath.ri EvalContext hasNext
public boolean hasNext()
From source file:org.openvpms.component.system.common.jxpath.OpenVPMSCoreFunction.java
@Override protected Object functionSum(EvalContext context) { Object v = getArg1().compute(context); if (v == null) { return ZERO; } else if (v instanceof EvalContext) { BigDecimal sum = new BigDecimal(0.0); EvalContext ctx = (EvalContext) v; while (ctx.hasNext()) { NodePointer ptr = (NodePointer) ctx.next(); sum = sum.add(TypeConversionUtil.bigDecimalValue(ptr)); }/*from www . j ava 2s. co m*/ return sum; } throw new JXPathException("Invalid argument type for 'sum': " + v.getClass().getName()); }