Also: Google
Play services
public interface FirebaseRemoteConfigValue
Wrapper for a Remote Config parameter value, with methods to get it as different types.
Public Method Summary
abstract boolean |
asBoolean()
Gets the value as a
boolean .
|
abstract byte[] |
asByteArray()
Gets the value as a
byte[] .
|
abstract double |
asDouble()
Gets the value as a
double .
|
abstract long |
asLong()
Gets the value as a
long .
|
abstract String |
asString()
Gets the value as a
String .
|
abstract int |
getSource()
Indicates at which source this value came from.
|
Public Methods
public abstract boolean asBoolean ()
Also:
Google Play services
Gets the value as a boolean
.
Returns
boolean
representation of this parameter value.
Throws
IllegalArgumentException | If the value cannot be converted to a boolean . |
---|
public abstract byte[] asByteArray ()
Also:
Google Play services
Gets the value as a byte[]
.
Returns
byte[]
representation of this parameter value.
public abstract double asDouble ()
Also:
Google Play services
Gets the value as a double
.
Returns
double
representation of this parameter value.
Throws
IllegalArgumentException | If the value cannot be converted to a double . |
---|
public abstract long asLong ()
Also:
Google Play services
Gets the value as a long
.
Returns
long
representation of this parameter value.
Throws
IllegalArgumentException | If the value cannot be converted to a long . |
---|
public abstract String asString ()
Also:
Google Play services
Gets the value as a String
.
Returns
String
representation of this parameter value.
public abstract int getSource ()
Also:
Google Play services
Indicates at which source this value came from.
Returns
VALUE_SOURCE_REMOTE
if the value was retrieved from the server,VALUE_SOURCE_DEFAULT
if the value was set as a default, orVALUE_SOURCE_STATIC
if no value was found and a static default value was returned instead.