use of uk.gov.gchq.gaffer.function.filter.Or in project Gaffer by gchq.
the class OrExample method property1IsLessThan2OrProperty2IsMoreThan2.
public void property1IsLessThan2OrProperty2IsMoreThan2() {
// ---------------------------------------------------------
final Or function = new Or(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 });
}
use of uk.gov.gchq.gaffer.function.filter.Or in project Gaffer by gchq.
the class OrExample method isLessThan2OrIsMoreThan2.
public void isLessThan2OrIsMoreThan2() {
// ---------------------------------------------------------
final Or function = new Or(Arrays.asList(new ConsumerFunctionContext.Builder<Integer, FilterFunction>().select(// select first property
0).execute(new IsLessThan(2)).build(), new ConsumerFunctionContext.Builder<Integer, FilterFunction>().select(// select first property
0).execute(new IsMoreThan(2)).build()));
// ---------------------------------------------------------
runExample(function, new Object[] { 1 }, new Object[] { 2 }, new Object[] { 3 }, new Object[] { 1L }, new Object[] { 3L });
}
Aggregations