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 TypeInputResult
java.lang.Integer5true
java.lang.Long5true
java.lang.String5true
java.lang.Character5true
java.lang.Integer1false
java.lang.Long1false
java.lang.String1false
java.lang.Character1false

results matching ""

    No results matching ""