IsIn
See javadoc - uk.gov.gchq.koryphe.impl.predicate.IsIn
Available since Koryphe version 1.0.0
Checks if an input is in a set of allowed values
Examples
Is in set
Java
JSON
Full JSON
Python
final IsIn function = new IsIn(5, 5L, "5", '5');
{
"class" : "IsIn",
"values" : [ 5, {
"Long" : 5
}, "5", {
"Character" : "5"
} ]
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.IsIn",
"values" : [ 5, {
"java.lang.Long" : 5
}, "5", {
"java.lang.Character" : "5"
} ]
}
g.IsIn(
values=[
5,
{'java.lang.Long': 5},
"5",
{'java.lang.Character': '5'}
]
)
Input type:
java.lang.Object
Example inputs:
Input Type | Input | Result |
---|---|---|
java.lang.Integer | 5 | true |
java.lang.Long | 5 | true |
java.lang.String | 5 | true |
java.lang.Character | 5 | true |
java.lang.Integer | 1 | false |
java.lang.Long | 1 | false |
java.lang.String | 1 | false |
java.lang.Character | 1 | false |