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 TypeInputResult
java.lang.Integer1true
java.lang.Long1false
java.lang.Integer5false
java.lang.Long5false
java.lang.Integer10false
java.lang.Long10false
java.lang.String1false

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 TypeInputResult
java.lang.Integer1true
java.lang.Long1false
java.lang.Integer5true
java.lang.Long5false
java.lang.Integer10false
java.lang.Long10false
java.lang.String1false

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 TypeInputResult
java.lang.Integer1false
java.lang.Long1true
java.lang.Integer5false
java.lang.Long5false
java.lang.Integer10false
java.lang.Long10false
java.lang.String1false

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 TypeInputResult
java.lang.Integer1false
java.lang.StringAtrue
java.lang.StringBfalse
java.lang.StringCfalse

results matching ""

    No results matching ""