MapContains
See javadoc - uk.gov.gchq.koryphe.impl.predicate.MapContains
Available since Koryphe version 1.0.0
Checks if a map contains a given key
Examples
Map contains
Java
JSON
Full JSON
Python
final MapContains function = new MapContains("a");
{
"class" : "MapContains",
"key" : "a"
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.MapContains",
"key" : "a"
}
g.MapContains(
key="a"
)
Input type:
java.util.Map
Example inputs:
Input Type | Input | Result |
---|---|---|
java.util.HashMap | {a=1, b=2, c=3} | true |
java.util.HashMap | {b=2, c=3} | false |
java.util.HashMap | {a=null, b=2, c=3} | true |