IsLessThan
See javadoc - uk.gov.gchq.koryphe.impl.predicate.IsLessThan
Available since Koryphe version 1.0.0
Checks if a comparable is less than a provided value
Examples
Is less than 5
Java
JSON
Full JSON
Python
final IsLessThan function = new IsLessThan(5);
{
"class" : "IsLessThan",
"orEqualTo" : false,
"value" : 5
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.IsLessThan",
"orEqualTo" : false,
"value" : 5
}
g.IsLessThan(
value=5,
or_equal_to=False
)
Input type:
java.lang.Comparable
Example inputs:
Input Type | Input | Result |
---|---|---|
java.lang.Integer | 1 | true |
java.lang.Long | 1 | false |
java.lang.Integer | 5 | false |
java.lang.Long | 5 | false |
java.lang.Integer | 10 | false |
java.lang.Long | 10 | false |
java.lang.String | 1 | false |
Is less than or equal to 5
Java
JSON
Full JSON
Python
final IsLessThan function = new IsLessThan(5, true);
{
"class" : "IsLessThan",
"orEqualTo" : true,
"value" : 5
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.IsLessThan",
"orEqualTo" : true,
"value" : 5
}
g.IsLessThan(
value=5,
or_equal_to=True
)
Input type:
java.lang.Comparable
Example inputs:
Input Type | Input | Result |
---|---|---|
java.lang.Integer | 1 | true |
java.lang.Long | 1 | false |
java.lang.Integer | 5 | true |
java.lang.Long | 5 | false |
java.lang.Integer | 10 | false |
java.lang.Long | 10 | false |
java.lang.String | 1 | false |
Is less than a long 5
Java
JSON
Full JSON
Python
final IsLessThan function = new IsLessThan(5L);
{
"class" : "IsLessThan",
"orEqualTo" : false,
"value" : {
"Long" : 5
}
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.IsLessThan",
"orEqualTo" : false,
"value" : {
"java.lang.Long" : 5
}
}
g.IsLessThan(
value={'java.lang.Long': 5},
or_equal_to=False
)
Input type:
java.lang.Comparable
Example inputs:
Input Type | Input | Result |
---|---|---|
java.lang.Integer | 1 | false |
java.lang.Long | 1 | true |
java.lang.Integer | 5 | false |
java.lang.Long | 5 | false |
java.lang.Integer | 10 | false |
java.lang.Long | 10 | false |
java.lang.String | 1 | false |
Is less than a string
Java
JSON
Full JSON
Python
final IsLessThan function = new IsLessThan("B");
{
"class" : "IsLessThan",
"orEqualTo" : false,
"value" : "B"
}
{
"class" : "uk.gov.gchq.koryphe.impl.predicate.IsLessThan",
"orEqualTo" : false,
"value" : "B"
}
g.IsLessThan(
value="B",
or_equal_to=False
)
Input type:
java.lang.Comparable
Example inputs:
Input Type | Input | Result |
---|---|---|
java.lang.Integer | 1 | false |
java.lang.String | A | true |
java.lang.String | B | false |
java.lang.String | C | false |