toLong

open fun toLong(source: Any, defaultValue: Long): Long

Converts the given object into a primitive long value.

Return

the converted value.

Parameters

source

the object to be converted.

defaultValue

the value that should be returned if the object cannot be converted.


open fun toLong(source: Any): Long

Converts the given object into a primitive long value.

Return

the converted value.

Parameters

source

the object to be converted.