/** * @param key the key to get the value for * @param defaultValue the value to return if no value is set for the specified key * @return the value */ default String getOrDefault(PropertyKey key, String defaultValue) { return isSet(key) ? get(key) : defaultValue; }
/** * @param key the key to get the value for * @param defaultValue the value to return if no value is set for the specified key * @param options options for getting configuration value * @return the value */ default String getOrDefault(PropertyKey key, String defaultValue, ConfigurationValueOptions options) { return isSet(key) ? get(key, options) : defaultValue; }
if (conf.isSet(service.mHostNameKey)) { String connectHost = conf.get(service.mHostNameKey); if (!connectHost.isEmpty() && !connectHost.equals(WILDCARD_ADDRESS)) { if (conf.isSet(service.mBindHostKey)) { String bindHost = conf.get(service.mBindHostKey); if (!bindHost.isEmpty() && !bindHost.equals(WILDCARD_ADDRESS)) {