IsShorterThan

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

Available since Koryphe version 1.0.0

Checks if the length of an input is more than than a value

Examples

Is shorter than 4

Java
JSON
Full JSON
Python
final IsShorterThan function = new IsShorterThan(4);
{
  "class" : "IsShorterThan",
  "maxLength" : 4,
  "orEqualTo" : false
}
{
  "class" : "uk.gov.gchq.koryphe.impl.predicate.IsShorterThan",
  "maxLength" : 4,
  "orEqualTo" : false
}
g.IsShorterThan( 
  max_length=4, 
  or_equal_to=False 
)

Input type:

java.lang.Object

Example inputs:

Input TypeInputResult
java.lang.String123true
java.lang.String1234false
[Ljava.lang.Integer;[1, 2, 3]true
[Ljava.lang.Integer;[1, 2, 3, 4]false
java.util.ArrayList[1, 2, 3]true
java.util.ArrayList[1, 2, 3, 4]false
java.util.HashMap{1=a, 2=b, 3=c}true
java.util.HashMap{4=d}true
java.lang.Integer10000IllegalArgumentException: Could not determine the size of the provided value
java.lang.Long10000IllegalArgumentException: Could not determine the size of the provided value

results matching ""

    No results matching ""