ToLong

See javadoc - uk.gov.gchq.koryphe.impl.function.ToLong

Available since Koryphe version 1.5.0

Returns any input as Long.

Examples

To long

Java
JSON
Full JSON
Python
final ToLong function = new ToLong();
{
  "class" : "ToLong"
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.ToLong"
}
g.ToLong()

Input type:

java.lang.Object

Example inputs:

Input TypeInputResult TypeResult
java.lang.Integer4java.lang.Long4
java.lang.Long5java.lang.Long5
java.lang.String5java.lang.Long5
java.lang.StringaStringNumberFormatException: For input string: "aString"
java.util.Arrays$ArrayList[6, 3]IllegalArgumentException: Could not convert value to Long: [6, 3]
nullnull

results matching ""

    No results matching ""