Not
See javadoc - uk.gov.gchq.koryphe.impl.predicate.Not
Available since Koryphe version 1.0.0
Returns the inverse of a predicate
Examples
Does not exist
Java
JSON
Full JSON
Python
final Not function = new Not<>(new Exists());
{
"class" : "Not",
"predicate" : {
"class" : "Exists"
}
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.Not",
"predicate" : {
"class" : "uk.gov.gchq.koryphe.impl.predicate.Exists"
}
}
g.Not(
predicate=g.Exists()
)
Input type:
uk.gov.gchq.koryphe.signature.Signature$UnknownGenericType
Example inputs:
Input Type | Input | Result |
---|---|---|
java.lang.Integer | 1 | false |
null | true | |
java.lang.String | false | |
java.lang.String | abc | false |
Are not equal
Java
JSON
Full JSON
Python
final Not function = new Not<>(new AreEqual());
{
"class" : "Not",
"predicate" : {
"class" : "AreEqual"
}
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.Not",
"predicate" : {
"class" : "uk.gov.gchq.koryphe.impl.predicate.AreEqual"
}
}
g.Not(
predicate=g.AreEqual()
)
Input type:
uk.gov.gchq.koryphe.signature.Signature$UnknownGenericType
Example inputs:
Input Type | Input | Result |
---|---|---|
[java.lang.Integer, java.lang.Double] | [1, 1.0] | true |
[java.lang.Integer, java.lang.Integer] | [1, 2] | true |
[java.lang.Double, java.lang.Double] | [2.5, 2.5] | false |
[java.lang.String, ] | [, null] | true |
[java.lang.String, java.lang.String] | [abc, abc] | false |