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 Type | Input | Result |
---|---|---|
java.lang.Integer | 5 | true |
java.lang.Long | 5 | false |
java.lang.String | 5 | false |
java.lang.Character | 5 | false |
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 Type | Input | Result |
---|---|---|
java.lang.Integer | 5 | false |
java.lang.Long | 5 | false |
java.lang.String | 5 | true |
java.lang.Character | 5 | false |
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 Type | Input | Result |
---|---|---|
java.lang.Integer | 5 | false |
java.lang.Long | 5 | true |
java.lang.String | 5 | false |
java.lang.Character | 5 | false |