Returns a string value that has been interpolated from System Properties
and Environment Variables using the ${name} or @{name} syntax.

@param name
@param defaultValue
@return an interpolated string
964135
public String getInterpolatedString(String name, String defaultValue) {
        String value = getString(name, defaultValue);
        return interpolateString(value);
    }
244098
public long getLongHeader(String name, long defaultValue) {
        String firstHeader = getHeader(name);
        if (firstHeader == null) {
            return defaultValue;
        }
        try {
            return Long.parseLong(firstHeader.trim());
        } catch (NumberFormatException e) {
            return defaultValue;
        }
    }
1349199
public boolean getBooleanProperty(final String name, final boolean defaultValue) {
        final String prop = getStringProperty(name);
        return prop == null ? defaultValue : "true".equalsIgnoreCase(prop);
    }
1295569
public static String getSystemProperty(String name, String defaultValue) {
        String value;
        value = System.getProperty(name, null);
        if (value != null) {
            return value;
        }
        value = System.getenv(name);
        if (value != null) {
            return value;
        }
        return defaultValue;
    }
57014
public static String getStringValue(Config stormConf, String key, String defaultValue)
    {
        Object config = stormConf.get(key);

        if (config == null)
        {
            return defaultValue;
        }

        return config.toString();
    }
722881
public synchronized String getGlobalProperty(String name, String defaultValue) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "getGlobalProperty", new Object[] { name, defaultValue });

        String value = getGlobalProperty(name);
        if (value == null) {
            value = defaultValue;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "getGlobalProperty -> " + value);
        return value;
    }
1193172
public String getValue(String name) {
	    	Properties properties = loadProperties();
	    	return (String) properties.getProperty(name);
    }
14183
public static function getVar(string $name, $defaultValue = null)
    {
        $value = getenv($name);
        return $value !== false ? $value : $defaultValue;
    }
411218
public String getSetting(final String key, final String defaultValue) {
        val result = environment.getProperty(this.propertyPrefix + '.' + key);
        return StringUtils.defaultIfBlank(result, defaultValue);
    }
1247352
@SuppressWarnings("null")
	public static String value(String key, String defaultValue) {
		return System.getProperty(key, defaultValue);
	}
911204
public function getValueFor($name, $defaultValue = null)
    {
        if (!$this->hasParameter($name)) {
            return $defaultValue;
        }
        return $this->parameters[strtolower($name)]->getValue();
    }
1008165
public static String toStringWithDefault(Object value, String defaultValue) {
		String result = toNullableString(value);
		return result != null ? result : defaultValue;
	}
393249
public String getString(String property, String defaultValue) {
    return getProperty(property, defaultValue, v -> v);
  }
76995
public long getLong(String name, long defaultValue) {
        try {
            String value = getString(name, null);
            if (!StringUtils.isNullOrEmpty(value)) {
                return Long.parseLong(value.trim());
            }
        } catch (NumberFormatException e) {
            log.warn("Failed to parse long for " + name + USING_DEFAULT_OF
                + defaultValue);
        }

        return defaultValue;
    }
985050
public String get(String key, String defaultValue)
    {
        if( configs.containsKey(key) ){
            return configs.get(key);
        }

        return defaultValue;
    }
1104793
public Collection<Object> getPropertyOrDefault(final String name, final Object defaultValue) {
        return getPropertyOrDefault(name, CollectionUtils.wrapList(defaultValue));
    }
1482
public float getFloat(String name, float defaultValue) {
        try {
            String value = getString(name, null);
            if (!StringUtils.isNullOrEmpty(value)) {
                return Float.parseFloat(value.trim());
            }
        } catch (NumberFormatException e) {
            log.warn("Failed to parse float for " + name + USING_DEFAULT_OF
                + defaultValue);
        }

        return defaultValue;
    }