Gets a property associated to this file.
@param key property key
@param defaultValue default value to use if the key does not exist or the value is null
@return property value or the default value passed
168541
public String getProperty(String key, String defaultValue) {
        String val = properties.get(key);

        if (val == null) {
            val = defaultValue;
        }

        return val;
    }
1106501
public String getProperty(String key, String defaultValue) {
        return mProperties.getProperty(key, defaultValue);
    }
591538
public static <T> T getOrDefaultValue(String primaryKey, T defaultValue) {
        Object val = CFG.get(primaryKey);
        return val == null ? defaultValue : (T) CompatibleTypeUtils.convert(val, defaultValue.getClass());
    }
442463
public static String getProperty(String propertyName, String defaultValue) {
        String value = get(propertyName);
        return value == null ? defaultValue : value;
    }
478337
public String getString(Enum<?> key, String defaultValue)
    {
        if (key == null)
        {
            return defaultValue;
        }

        return getString(key.name(), defaultValue);
    }
1372318
public long getCapacityBytesOnTiersOrDefault(
      java.lang.String key,
      long defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.Long> map =
        internalGetCapacityBytesOnTiers().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
401138
public function getProperty($key, $defaultValue = null)
    {
        if (array_key_exists($key, $this->storage)) {
            return $this->storage[$key];
        }

        return $defaultValue;
    }
1140619
public java.lang.String getEnvVariablesOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetEnvVariables().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
965214
public <T> T get(String key, T defaultValue) {
        T value = get(key);
        if (value == null) {
            return defaultValue;
        }
        return value;
    }
744208
public String getOrDefault(String key, String defaultValue) {
        return map.getOrDefault(key, defaultValue);
    }
965220
public String optString(String key, String defaultValue) {
        Object object = this.opt(key);
        return NULL.equals(object) ? defaultValue : object.toString();
    }
1342760
@Override
	public String getProperty(String key) {
		String p = super.getProperty(key);
		if (StrKit.isBlank(p)) {
			new IllegalArgumentException("`"+key+"` Cannot be empty, set `"+key+"` in "+cfg+" file");
		}
		return p;
	}
1119261
public static Boolean getBooleanProperty(String key, Boolean defaultValue) {
        String value = getProperty(key);
        if((null == value) || value.isEmpty() ) {
            return (null == defaultValue) ? false : defaultValue;
        }
        if("null".equals(value.toLowerCase()) && (null != defaultValue) ) {
            return defaultValue;
        }
        return Boolean.parseBoolean(value);
    }
121197
public Integer getIntegerProperty(String key, Integer defaultValue) {
        String val = getProperty(key, defaultValue.toString());
        try {
            Integer intVal = Integer.parseInt(val);
            return intVal;
        } catch (NumberFormatException e) {
            return defaultValue;
        }
    }
958027
public String getDefault(final String key) {
        if (defaultValues.containsKey(key)) {
            return defaultValues.get(key);
        }
        return "";
    }
778156
public Object get(Object key) {
        Object val = super.get(key);
        if (val == null && key instanceof Option) {
            val = ((Option)key).defaultValue;
        }

        return val;
    }
854571
public Float getFloatProperty(String key, Float defaultValue) {
        String val = getProperty(key, defaultValue.toString());
        try {
            Float intVal = Float.parseFloat(val);
            return intVal;
        } catch (NumberFormatException e) {
            return defaultValue;
        }
    }