DefaultIfEmpty
See javadoc - uk.gov.gchq.koryphe.impl.function.DefaultIfEmpty
Available since Koryphe version 1.9.0
Provides a default value if the input is empty.
Examples
Run default if empty examples
Java
JSON
Full JSON
Python
final DefaultIfEmpty function = new DefaultIfEmpty();
{
"class" : "DefaultIfEmpty"
}
{
"class" : "uk.gov.gchq.koryphe.impl.function.DefaultIfEmpty"
}
g.DefaultIfEmpty()
Input type:
java.lang.Object
Example inputs:
Input Type | Input | Result Type | Result |
---|---|---|---|
java.lang.String | String input | java.lang.String | String input |
java.lang.Long | 5 | IllegalArgumentException: Could not determine the size of the provided value | |
null | null | ||
java.lang.String | null |