Longest
See javadoc - uk.gov.gchq.koryphe.impl.function.Longest
Available since Koryphe version 1.9.0
Determines which of two input objects is the longest.
Examples
Get longest
Java
JSON
Full JSON
Python
final Longest function = new Longest();
{
"class" : "Longest"
}
{
"class" : "uk.gov.gchq.koryphe.impl.function.Longest"
}
g.Longest()
Input type:
java.lang.Object, java.lang.Object
Example inputs:
Input Type | Input | Result Type | Result |
---|---|---|---|
[java.lang.String, java.lang.String] | [smaller, long string] | java.lang.String | long string |
[java.util.ArrayList, java.util.HashSet] | [[1, 2], [1.5]] | java.util.ArrayList | [1, 2] |
[ ,java.lang.String] | [null, value] | java.lang.String | value |
null | IllegalArgumentException: Input tuple is required |