@Test public void getKeysByPrefix_nullPrefix_returnsAllKeys() throws Exception { loadActivatedCacheWithMap(ImmutableMap.of("pre11", "", "pre21", "", "pre222", "")); loadDefaultsCacheWithMap(ImmutableMap.of("pre31", "", "pre122", "", "pre2333", "")); Set<String> keys = getHandler.getKeysByPrefix(null); assertThat(keys).containsExactly("pre11", "pre122", "pre21", "pre222", "pre2333", "pre31"); }
public Set<String> getKeysByPrefix(String prefix) { if (prefix == null) { prefix = ""; } TreeSet<String> keysWithPrefix = new TreeSet<>(); ConfigContainer activatedConfigs = getConfigsFromCache(activatedConfigsCache); if (activatedConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, activatedConfigs)); } ConfigContainer defaultsConfigs = getConfigsFromCache(defaultConfigsCache); if (defaultsConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, defaultsConfigs)); } return keysWithPrefix; }
ConfigGetParameterHandler { public Set<String> getKeysByPrefix(String prefix) { if (prefix == null) { prefix = ""; } TreeSet<String> keysWithPrefix = new TreeSet<>(); ConfigContainer activatedConfigs = getConfigsFromCache(activatedConfigsCache); if (activatedConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, activatedConfigs)); } ConfigContainer defaultsConfigs = getConfigsFromCache(defaultConfigsCache); if (defaultsConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, defaultsConfigs)); } return keysWithPrefix; } }
ConfigGetParameterHandler { public Set<String> getKeysByPrefix(String prefix) { if (prefix == null) { prefix = ""; } TreeSet<String> keysWithPrefix = new TreeSet<>(); ConfigContainer activatedConfigs = getConfigsFromCache(activatedConfigsCache); if (activatedConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, activatedConfigs)); } ConfigContainer defaultsConfigs = getConfigsFromCache(defaultConfigsCache); if (defaultsConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, defaultsConfigs)); } return keysWithPrefix; } ConfigGetParameterHandler(
      ConfigCacheClient activatedConfigsCache, ConfigCacheClient defaultConfigsCache); }
ConfigGetParameterHandler { public Set<String> getKeysByPrefix(String prefix) { if (prefix == null) { prefix = ""; } TreeSet<String> keysWithPrefix = new TreeSet<>(); ConfigContainer activatedConfigs = getConfigsFromCache(activatedConfigsCache); if (activatedConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, activatedConfigs)); } ConfigContainer defaultsConfigs = getConfigsFromCache(defaultConfigsCache); if (defaultsConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, defaultsConfigs)); } return keysWithPrefix; } ConfigGetParameterHandler(
      ConfigCacheClient activatedConfigsCache, ConfigCacheClient defaultConfigsCache); String getString(String key); boolean getBoolean(String key); byte[] getByteArray(String key); double getDouble(String key); long getLong(String key); FirebaseRemoteConfigValue getValue(String key); Set<String> getKeysByPrefix(String prefix); Map<String, FirebaseRemoteConfigValue> getAll(); }
ConfigGetParameterHandler { public Set<String> getKeysByPrefix(String prefix) { if (prefix == null) { prefix = ""; } TreeSet<String> keysWithPrefix = new TreeSet<>(); ConfigContainer activatedConfigs = getConfigsFromCache(activatedConfigsCache); if (activatedConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, activatedConfigs)); } ConfigContainer defaultsConfigs = getConfigsFromCache(defaultConfigsCache); if (defaultsConfigs != null) { keysWithPrefix.addAll(getKeysByPrefix(prefix, defaultsConfigs)); } return keysWithPrefix; } ConfigGetParameterHandler(
      ConfigCacheClient activatedConfigsCache, ConfigCacheClient defaultConfigsCache); String getString(String key); boolean getBoolean(String key); byte[] getByteArray(String key); double getDouble(String key); long getLong(String key); FirebaseRemoteConfigValue getValue(String key); Set<String> getKeysByPrefix(String prefix); Map<String, FirebaseRemoteConfigValue> getAll(); @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
  static final Charset FRC_BYTE_ARRAY_ENCODING; }