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 TypeInputResult TypeResult
java.lang.StringString inputjava.lang.StringString input
java.lang.Long5IllegalArgumentException: Could not determine the size of the provided value
nullnull
java.lang.Stringnull

results matching ""

    No results matching ""