use of uk.gov.gchq.gaffer.function.filter.And in project Gaffer by gchq.
the class AndExample method isLessThan3AndIsMoreThan0.
public void isLessThan3AndIsMoreThan0() {
// ---------------------------------------------------------
final And function = new And(Arrays.asList(new ConsumerFunctionContext.Builder<Integer, FilterFunction>().select(// select first property
0).execute(new IsLessThan(3)).build(), new ConsumerFunctionContext.Builder<Integer, FilterFunction>().select(// select first property
0).execute(new IsMoreThan(0)).build()));
// ---------------------------------------------------------
runExample(function, new Object[] { 0 }, new Object[] { 1 }, new Object[] { 2 }, new Object[] { 3 }, new Object[] { 1L }, new Object[] { 2L });
}
use of uk.gov.gchq.gaffer.function.filter.And in project Gaffer by gchq.
the class AndExample method property1IsLessThan2AndProperty2IsMoreThan2.
public void property1IsLessThan2AndProperty2IsMoreThan2() {
// ---------------------------------------------------------
final And function = new And(Arrays.asList(new ConsumerFunctionContext.Builder<Integer, FilterFunction>().select(// select first property
0).execute(new IsLessThan(2)).build(), new ConsumerFunctionContext.Builder<Integer, FilterFunction>().select(// select second property
1).execute(new IsMoreThan(2)).build()));
// ---------------------------------------------------------
runExample(function, new Object[] { 1, 3 }, new Object[] { 1, 1 }, new Object[] { 3, 3 }, new Object[] { 3, 1 }, new Object[] { 1L, 3L }, new Object[] { 1 });
}
Aggregations