Search in sources :

Example 1 with IsMoreThan

use of uk.gov.gchq.gaffer.function.filter.IsMoreThan 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 });
}
Also used : FilterFunction(uk.gov.gchq.gaffer.function.FilterFunction) ConsumerFunctionContext(uk.gov.gchq.gaffer.function.context.ConsumerFunctionContext) IsLessThan(uk.gov.gchq.gaffer.function.filter.IsLessThan) And(uk.gov.gchq.gaffer.function.filter.And) IsMoreThan(uk.gov.gchq.gaffer.function.filter.IsMoreThan)

Example 2 with IsMoreThan

use of uk.gov.gchq.gaffer.function.filter.IsMoreThan 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 });
}
Also used : FilterFunction(uk.gov.gchq.gaffer.function.FilterFunction) ConsumerFunctionContext(uk.gov.gchq.gaffer.function.context.ConsumerFunctionContext) IsLessThan(uk.gov.gchq.gaffer.function.filter.IsLessThan) And(uk.gov.gchq.gaffer.function.filter.And) IsMoreThan(uk.gov.gchq.gaffer.function.filter.IsMoreThan)

Example 3 with IsMoreThan

use of uk.gov.gchq.gaffer.function.filter.IsMoreThan in project Gaffer by gchq.

the class IsMoreThanExample method isMoreThan5.

public void isMoreThan5() {
    // ---------------------------------------------------------
    final IsMoreThan function = new IsMoreThan(5);
    // ---------------------------------------------------------
    runExample(function, 1, 5, 10);
}
Also used : IsMoreThan(uk.gov.gchq.gaffer.function.filter.IsMoreThan)

Example 4 with IsMoreThan

use of uk.gov.gchq.gaffer.function.filter.IsMoreThan in project Gaffer by gchq.

the class IsMoreThanExample method isMoreThanOrEqualTo5.

public void isMoreThanOrEqualTo5() {
    // ---------------------------------------------------------
    final IsMoreThan function = new IsMoreThan(5, true);
    // ---------------------------------------------------------
    runExample(function, 1, 5, 10);
}
Also used : IsMoreThan(uk.gov.gchq.gaffer.function.filter.IsMoreThan)

Example 5 with IsMoreThan

use of uk.gov.gchq.gaffer.function.filter.IsMoreThan in project Gaffer by gchq.

the class IsMoreThanExample method isMoreThanALong5.

public void isMoreThanALong5() {
    // ---------------------------------------------------------
    final IsMoreThan function = new IsMoreThan(5L);
    // ---------------------------------------------------------
    runExample(function, 1, 1L, 5, 5L, 10, 10L, "abc");
}
Also used : IsMoreThan(uk.gov.gchq.gaffer.function.filter.IsMoreThan)

Aggregations

IsMoreThan (uk.gov.gchq.gaffer.function.filter.IsMoreThan)13 IsLessThan (uk.gov.gchq.gaffer.function.filter.IsLessThan)5 FilterFunction (uk.gov.gchq.gaffer.function.FilterFunction)4 ConsumerFunctionContext (uk.gov.gchq.gaffer.function.context.ConsumerFunctionContext)4 Edge (uk.gov.gchq.gaffer.data.element.Edge)3 Graph (uk.gov.gchq.gaffer.graph.Graph)3 AddElements (uk.gov.gchq.gaffer.operation.impl.add.AddElements)3 User (uk.gov.gchq.gaffer.user.User)3 ElementFilter (uk.gov.gchq.gaffer.data.element.function.ElementFilter)2 View (uk.gov.gchq.gaffer.data.elementdefinition.view.View)2 MapFilter (uk.gov.gchq.gaffer.function.MapFilter)2 And (uk.gov.gchq.gaffer.function.filter.And)2 Or (uk.gov.gchq.gaffer.function.filter.Or)2 OperationChain (uk.gov.gchq.gaffer.operation.OperationChain)2 EntitySeed (uk.gov.gchq.gaffer.operation.data.EntitySeed)2 GetEdges (uk.gov.gchq.gaffer.operation.impl.get.GetEdges)2 FreqMap (uk.gov.gchq.gaffer.types.FreqMap)2 ArrayList (java.util.ArrayList)1 IsEdgeValidator (uk.gov.gchq.gaffer.data.IsEdgeValidator)1 Element (uk.gov.gchq.gaffer.data.element.Element)1