Method is used to retrieve a list and convert it to an immutable set.

@param config Config to read
@param key    Key to read
@return ImmutableSet with the contents of the config key.
@see com.google.common.collect.ImmutableSet
326267
public static Set<String> getSet(AbstractConfig config, String key) {
    List<String> value = config.getList(key);
    return ImmutableSet.copyOf(value);
  }
686463
public static Set<String> cacheNames(Config config) {
    return config.hasPath("caffeine.jcache")
        ? Collections.unmodifiableSet(config.getObject("caffeine.jcache").keySet())
        : Collections.emptySet();
  }
729313
private Configuration getConfigurationInternal(final String[] keys) {

		Configuration conf = new Configuration();

		synchronized (this.confData) {

			final Iterator<String> it = this.confData.keySet().iterator();

			while (it.hasNext()) {

				final String key = it.next();
				boolean found = false;
				if (keys != null) {
					for (int i = 0; i < keys.length; i++) {
						if (key.equals(keys[i])) {
							found = true;
							break;
						}
					}

					if (found) {
						conf.setString(key, this.confData.get(key));
					}
				} else {
					conf.setString(key, this.confData.get(key));
				}
			}
		}

		return conf;
	}
598253
public static KeyManagerFactory keyManagerFactory(AbstractConfig config, String key) {
    final String keyManagerFactoryType = config.getString(key);
    try {
      return KeyManagerFactory.getInstance(keyManagerFactoryType);
    } catch (NoSuchAlgorithmException e) {
      ConfigException exception = new ConfigException(
          key,
          keyManagerFactoryType,
          "Unknown Algorithm."
      );
      exception.initCause(e);
      throw exception;
    }
  }
1116263
protected <T> T map(Config config, Class<T> clazz) {
    return map(config, null, null, clazz);
  }
1328136
@NonNull
  public static <E> ImmutableSet<E> concatSet(
      @NonNull ImmutableSet<E> set, @NonNull Iterable<E> toConcat) {
    return ImmutableSet.<E>builder().addAll(set).addAll(toConcat).build();
  }
439723
public static byte[] passwordBytes(AbstractConfig config, String key, Charset charset) {
    final Password password = config.getPassword(key);
    return password.value().getBytes(charset);
  }
1324315
public <T> T get(ConfigKey key, T def) {
        Object o = data.get(key);
        if (null == o) {
            o = key.val(raw);
            if (null == o) {
                o = null == def ? NULL : def;
            }
            data.put(key, o);
        }
        if (isDebugEnabled()) {
            debug("config[%s] loaded: %s", key, o);
        }
        if (o == NULL) {
            return null;
        } else {
            return (T) o;
        }
    }
1323174
public void setConfig(Config config) {
        if (mapperHelper == null) {
            mapperHelper = new MapperHelper();
        }
        mapperHelper.setConfig(config);
    }
1106536
function(key) {
            this._configs = this._configs || {};
            var config = this._configs[key] || {};
            var map = {}; // returning a copy to prevent overrides
            
            for (key in config) {
                if ( Lang.hasOwnProperty(config, key) ) {
                    map[key] = config[key];
                }
            }
    
            return map;
        }
827111
public Set<String> getPropAsSet(String key, String def) {
    return ImmutableSet.copyOf(LIST_SPLITTER.splitToList(getProp(key, def)));
  }
201696
@Override
    public List<String> getList(final String key) {
        return retrieve(new Callable<List<String>>() {
            @Override
            public List<String> call() throws Exception {
                try {
                    return configuration.getStringList(key);
                } catch (ConfigException.WrongType e) {
                    // Not a list.
                    String s = get(key);
                    if (s != null) {
                        return ImmutableList.of(s);
                    } else {
                        throw new IllegalArgumentException("Cannot create a list for the key '" + key + "'", e);
                    }
                }
            }
        }, Collections.<String>emptyList());
    }
280783
@SuppressWarnings("unchecked")
    public <T> Set<T> getSet(String key) {
        return Reflection.toType(get(key), Set.class);
    }
1139256
static final Set<String> uniquePrefixSet(final Config config) {

      Set<String> prefixSet = Sets.newHashSet();
      for(Map.Entry<String, ConfigValue> entry : config.entrySet()) {
         String key = entry.getKey();
         int index = key.indexOf('.');
         if(index > 0) {
            String prefix = key.substring(0, index);
            prefixSet.add(prefix);
         }
      }

      return prefixSet;
   }
824212
public <T> List<T> getList(RythmConfigurationKey key, Class<T> c) {
        Object o = data.get(key);
        if (null == o) {
            List<T> l = RythmConfigurationKey.getImplList(key.getKey(), raw, c);
            data.put(key, l);
            return l;
        } else {
            return (List) o;
        }
    }
809667
public static ImmutableConfig copyOf(Config config) {
        if (config instanceof ImmutableConfig) {
            return (ImmutableConfig) config;
        } else {
            return new ImmutableConfig(config);
        }
    }
1146369
public CassandraJavaRDD<R> withReadConf(ReadConf config) {
        CassandraRDD<R> newRDD = rdd().withReadConf(config);
        return wrap(newRDD);
    }