public Object evaluate(Object feature) { String arg0; try { // attempt to get value and perform conversion arg0 = getExpression(0).evaluate(feature, String.class); // extra // protection // for // strings } catch (Exception e) // probably a type error { throw new IllegalArgumentException( "Filter Function problem for function parseInt argument #0 - expected type String"); } return new Integer(StaticGeometry.parseInt(arg0)); }