@Test public void testAnyMatchPrimitiveArrays() throws Exception { FilterFactoryImpl ff = new FilterFactoryImpl(); Function func = ff.function( "equalTo", ff.literal(new int[] {1, 2, 3, 4, 5, 6, 7, 8}), ff.literal(new int[] {1, 2, 3}), ff.literal("ANY")); assertTrue((Boolean) func.evaluate(new Object())); }
public Object evaluate(Object feature) { Expression arg0 = getExpression(0); Expression arg1 = getExpression(1); MatchAction matchAction = null; if (getParameters().size() > 2) { try { matchAction = (MatchAction) getExpression(2).evaluate(feature, MatchAction.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function equalTo argument #2 - expected one of ANY, ONE or ALL"); } } Filter equalTo = matchAction == null ? getFilterFactory2().equal(arg0, arg1, false) : getFilterFactory2().equal(arg0, arg1, false, matchAction); return equalTo.evaluate(feature); }
FilterFunction_equalTo extends FunctionExpressionImpl { public Object evaluate(Object feature) { Expression arg0 = getExpression(0); Expression arg1 = getExpression(1); MatchAction matchAction = null; if (getParameters().size() > 2) { try { matchAction = (MatchAction) getExpression(2).evaluate(feature, MatchAction.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function equalTo argument #2 - expected one of ANY, ONE or ALL"); } } Filter equalTo = matchAction == null ? getFilterFactory2().equal(arg0, arg1, false) : getFilterFactory2().equal(arg0, arg1, false, matchAction); return equalTo.evaluate(feature); } }
FilterFunction_equalTo extends FunctionExpressionImpl { public Object evaluate(Object feature) { Expression arg0 = getExpression(0); Expression arg1 = getExpression(1); MatchAction matchAction = null; if (getParameters().size() > 2) { try { matchAction = (MatchAction) getExpression(2).evaluate(feature, MatchAction.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function equalTo argument #2 - expected one of ANY, ONE or ALL"); } } Filter equalTo = matchAction == null ? getFilterFactory2().equal(arg0, arg1, false) : getFilterFactory2().equal(arg0, arg1, false, matchAction); return equalTo.evaluate(feature); } FilterFunction_equalTo(); }
FilterFunction_equalTo extends FunctionExpressionImpl { public Object evaluate(Object feature) { Expression arg0 = getExpression(0); Expression arg1 = getExpression(1); MatchAction matchAction = null; if (getParameters().size() > 2) { try { matchAction = (MatchAction) getExpression(2).evaluate(feature, MatchAction.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function equalTo argument #2 - expected one of ANY, ONE or ALL"); } } Filter equalTo = matchAction == null ? getFilterFactory2().equal(arg0, arg1, false) : getFilterFactory2().equal(arg0, arg1, false, matchAction); return equalTo.evaluate(feature); } FilterFunction_equalTo(); Object evaluate(Object feature); }
FilterFunction_equalTo extends FunctionExpressionImpl { public Object evaluate(Object feature) { Expression arg0 = getExpression(0); Expression arg1 = getExpression(1); MatchAction matchAction = null; if (getParameters().size() > 2) { try { matchAction = (MatchAction) getExpression(2).evaluate(feature, MatchAction.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function equalTo argument #2 - expected one of ANY, ONE or ALL"); } } Filter equalTo = matchAction == null ? getFilterFactory2().equal(arg0, arg1, false) : getFilterFactory2().equal(arg0, arg1, false, matchAction); return equalTo.evaluate(feature); } FilterFunction_equalTo(); Object evaluate(Object feature); static FunctionName NAME; }