class FirebaseRemoteConfigValueImpl implements FirebaseRemoteConfigValue {

  @Override
  public double asDouble() {
    if (source == FirebaseRemoteConfig.VALUE_SOURCE_STATIC) {
      return FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE;
    }

    String valueAsString = asTrimmedString();
    try {
      return Double.valueOf(valueAsString);
    } catch (NumberFormatException e) {
      throw new IllegalArgumentException(
          String.format(ILLEGAL_ARGUMENT_STRING_FORMAT, valueAsString, "double"), e);
    }
  }

    FirebaseRemoteConfigValueImpl(String value, int source);

}