IsEqual

See javadoc - uk.gov.gchq.koryphe.impl.predicate.IsEqual

Available since Koryphe version 1.0.0

Checks if an input is equal to a provided value

Examples

Is equal to 5

Java
JSON
Full JSON
Python
final IsEqual function = new IsEqual(5);
{
  "class" : "IsEqual",
  "value" : 5
}
{
  "class" : "uk.gov.gchq.koryphe.impl.predicate.IsEqual",
  "value" : 5
}
g.IsEqual( 
  value=5 
)

Input type:

java.lang.Object

Example inputs:

Input TypeInputResult
java.lang.Integer5true
java.lang.Long5false
java.lang.String5false
java.lang.Character5false

Is equal to string 5

Java
JSON
Full JSON
Python
final IsEqual function = new IsEqual("5");
{
  "class" : "IsEqual",
  "value" : "5"
}
{
  "class" : "uk.gov.gchq.koryphe.impl.predicate.IsEqual",
  "value" : "5"
}
g.IsEqual( 
  value="5" 
)

Input type:

java.lang.Object

Example inputs:

Input TypeInputResult
java.lang.Integer5false
java.lang.Long5false
java.lang.String5true
java.lang.Character5false

Is equal long 5

Java
JSON
Full JSON
Python
final IsEqual function = new IsEqual(5L);
{
  "class" : "IsEqual",
  "value" : {
    "Long" : 5
  }
}
{
  "class" : "uk.gov.gchq.koryphe.impl.predicate.IsEqual",
  "value" : {
    "java.lang.Long" : 5
  }
}
g.IsEqual( 
  value={'java.lang.Long': 5} 
)

Input type:

java.lang.Object

Example inputs:

Input TypeInputResult
java.lang.Integer5false
java.lang.Long5true
java.lang.String5false
java.lang.Character5false

results matching ""

    No results matching ""