Search in sources :

Example 1 with Exists

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

the class MapFilterExample method mapWithDateKeyHasAValueThatExists.

public void mapWithDateKeyHasAValueThatExists() {
    // ---------------------------------------------------------
    final MapFilter function = new MapFilter(new Date(0L), new Exists());
    // ---------------------------------------------------------
    final Map<Date, Long> map1 = new HashMap<>();
    map1.put(new Date(0L), 1L);
    final Map<Date, Long> map2 = new HashMap<>();
    map2.put(new Date(), 2L);
    runExample(function, map1, map2);
}
Also used : HashMap(java.util.HashMap) Exists(uk.gov.gchq.gaffer.function.filter.Exists) MapFilter(uk.gov.gchq.gaffer.function.MapFilter) Date(java.util.Date)

Example 2 with Exists

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

the class NotExample method doesNotExist.

public void doesNotExist() {
    // ---------------------------------------------------------
    final Not function = new Not(new Exists());
    // ---------------------------------------------------------
    runExample(function, new Object[] { 1 }, new Object[] { null }, new Object[] { "" }, new Object[] { "abc" });
}
Also used : Not(uk.gov.gchq.gaffer.function.filter.Not) Exists(uk.gov.gchq.gaffer.function.filter.Exists)

Example 3 with Exists

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

the class ExistsExample method exists.

public void exists() {
    // ---------------------------------------------------------
    final Exists function = new Exists();
    // ---------------------------------------------------------
    runExample(function, 1, null, "", "abc");
}
Also used : Exists(uk.gov.gchq.gaffer.function.filter.Exists)

Aggregations

Exists (uk.gov.gchq.gaffer.function.filter.Exists)3 Date (java.util.Date)1 HashMap (java.util.HashMap)1 MapFilter (uk.gov.gchq.gaffer.function.MapFilter)1 Not (uk.gov.gchq.gaffer.function.filter.Not)1