remote-config / com.rakuten.tech.mobile.remoteconfig / RemoteConfig / getNumber
getNumber
abstract fun <T :
Number
> getNumber(key:
String
, fallback:
T
):
T
Get a number from the Cached config. If the key does not exist, fallback will be returned. Number will attempt to be converted to type T. If the conversion fails (i.e. the value in the cached config is a not a number) then fallback will be returned.
Parameters
key
- returns value for this key in the config
fallback
- returned when the key does not exist or cached value cannot be converted
to number
Return T value for the specified key. T must be a subtype of Number such as Int, Long, Short, Float, Double, or Byte