public Object evaluate(Object feature) { String arg0; String arg1; try { // attempt to get value and perform conversion arg0 = (String) 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 strEqualsIgnoreCase argument #0 - expected type String"); } try { // attempt to get value and perform conversion arg1 = (String) getExpression(1).evaluate(feature, String.class); // extra // protection // for // strings } catch (Exception e) // probably a type error { throw new IllegalArgumentException( "Filter Function problem for function strEqualsIgnoreCase argument #1 - expected type String"); } return new Boolean(StaticGeometry.strEqualsIgnoreCase(arg0, arg1)); }