public Object evaluate(Object feature) { double arg0; double arg1; try { // attempt to get value and perform conversion arg0 = getExpression(0).evaluate(feature, Double.class).doubleValue(); } catch (Exception e) { // probably a type error throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #0 - expected type double"); } try { // attempt to get value and perform conversion arg1 = getExpression(1).evaluate(feature, Double.class).doubleValue(); } catch (Exception e) { // probably a type error throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #1 - expected type double"); } return new Double(Math.IEEEremainder(arg0, arg1)); } }
public Object evaluate(Object feature) { double arg0; double arg1; try { // attempt to get value and perform conversion arg0 = getExpression(0).evaluate(feature, Double.class).doubleValue(); } catch (Exception e) { // probably a type error throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #0 - expected type double"); } try { // attempt to get value and perform conversion arg1 = getExpression(1).evaluate(feature, Double.class).doubleValue(); } catch (Exception e) { // probably a type error throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #1 - expected type double"); } return new Double(Math.IEEEremainder(arg0, arg1)); } }
public Object evaluate(Object feature) { double arg0; double arg1; try { // attempt to get value and perform conversion arg0 = ((Number) getExpression(0).evaluate(feature)).doubleValue(); } catch (Exception e) { // probably a type error throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #0 - expected type double"); } try { // attempt to get value and perform conversion arg1 = ((Number) getExpression(1).evaluate(feature)).doubleValue(); } catch (Exception e) { // probably a type error throw new IllegalArgumentException( "Filter Function problem for function IEEEremainder argument #1 - expected type double"); } return new Double(Math.IEEEremainder(arg0, arg1)); } }