public final static Number divide(final Object obj0, final Object obj1) { if (obj0 == null && obj1 == null) { return ZERO; } final ELArithmetic delegate; if (BIGDECIMAL.matches(obj0, obj1)) delegate = BIGDECIMAL; else if (BIGINTEGER.matches(obj0, obj1)) delegate = BIGDECIMAL; else delegate = DOUBLE; Number num0 = delegate.coerce(obj0); Number num1 = delegate.coerce(obj1); return delegate.divide(num0, num1); }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
public Object getValue(ELContext context) { if (this.expectedType != null) { return ELSupport.coerceToType(this.value, this.expectedType); } return this.value; }
public final static boolean isDoubleStringOp(final Object obj0, final Object obj1) { return (isDoubleOp(obj0, obj1) || (obj0 instanceof String && isStringFloat((String) obj0)) || (obj1 instanceof String && isStringFloat((String) obj1))); }
private void prepare(Node node) throws ELException { try { node.accept(this); } catch (Exception e) { throw (ELException) e; } if (this.fnMapper instanceof FunctionMapperFactory) { this.fnMapper = ((FunctionMapperFactory) this.fnMapper).create(); } if (this.varMapper instanceof VariableMapperFactory) { this.varMapper = ((VariableMapperFactory) this.varMapper).create(); } }
public final static Node createNode(String expr) throws ELException { Node n = createNodeInternal(expr); return n; }
public final static Number divide(final Object obj0, final Object obj1) { if (obj0 == null && obj1 == null) { return ZERO; } final ELArithmetic delegate; if (BIGDECIMAL.matches(obj0, obj1)) delegate = BIGDECIMAL; else if (BIGINTEGER.matches(obj0, obj1)) delegate = BIGDECIMAL; else delegate = DOUBLE; Number num0 = delegate.coerce(obj0); Number num1 = delegate.coerce(obj1); return delegate.divide(num0, num1); }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
public final static boolean isDoubleStringOp(final Object obj0, final Object obj1) { return (isDoubleOp(obj0, obj1) || (obj0 instanceof String && isStringFloat((String) obj0)) || (obj1 instanceof String && isStringFloat((String) obj1))); }
public Object invoke(ELContext context, Object[] params) throws ELException { if (this.expectedType != null) { return ELSupport.coerceToType(this.expr, this.expectedType); } else { return this.expr; } }
public final static Number divide(final Object obj0, final Object obj1) { if (obj0 == null && obj1 == null) { return ZERO; } final ELArithmetic delegate; if (BIGDECIMAL.matches(obj0, obj1)) delegate = BIGDECIMAL; else if (BIGINTEGER.matches(obj0, obj1)) delegate = BIGDECIMAL; else delegate = DOUBLE; Number num0 = delegate.coerce(obj0); Number num1 = delegate.coerce(obj1); return delegate.divide(num0, num1); }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
public final static boolean isDoubleStringOp(final Object obj0, final Object obj1) { return (isDoubleOp(obj0, obj1) || (obj0 instanceof String && isStringFloat((String) obj0)) || (obj1 instanceof String && isStringFloat((String) obj1))); }
public Object invoke(ELContext context, Object[] params) throws ELException { if (this.expectedType != null) { return ELSupport.coerceToType(this.expr, this.expectedType); } else { return this.expr; } }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
public Object getValue(ELContext context) { if (this.expectedType != null) { return ELSupport.coerceToType(this.value, this.expectedType); } return this.value; }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
public Object getValue(ELContext context) { if (this.expectedType != null) { return ELSupport.coerceToType(this.value, this.expectedType); } return this.value; }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
public Object invoke(ELContext context, Object[] params) throws ELException { if (this.expectedType != null) { return ELSupport.coerceToType(this.expr, this.expectedType); } else { return this.expr; } }