CollectionContains
See javadoc - uk.gov.gchq.koryphe.impl.predicate.CollectionContains
Available since Koryphe version 1.0.0
Checks if a collection contains a provided value
Examples
Collection contains
Java
JSON
Full JSON
Python
final CollectionContains function = new CollectionContains(1);
{
"class" : "CollectionContains",
"value" : 1
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.CollectionContains",
"value" : 1
}
g.CollectionContains(
value=1
)
Input type:
java.util.Collection
Example inputs:
Input Type | Input | Result |
---|---|---|
java.util.HashSet | [1, 2, 3] | true |
java.util.HashSet | [1] | true |
java.util.HashSet | [2] | false |
java.util.HashSet | [] | false |