Gets property or default.

@param name          the name
@param defaultValues the default values
@return the property or default
338633
public Collection<Object> getPropertyOrDefault(final String name, final Collection<Object> defaultValues) {
        if (this.properties.containsKey(name)) {
            return this.properties.get(name);
        }
        return defaultValues;
    }
401183
public static function getDefault($keys, $defaultValue) {
    try {
      $value = self::req($keys);
    } catch (MissingConfigVariableException $e) {
      return $defaultValue;
    }
    
    return $value;
  }
794669
public static <T> T selectValue(T defaultValue, T... overrides) {
        for (T override : overrides) {
            if (override != null) {
                return override;
            }
        }
        return defaultValue;
    }
814485
public static void getDefaultValues(Properties defaultValues) {
		defaultValues.put(NetworkConfig.SERIALIZER_CLASSNAME, DEFAULT_EVENT_SERIALIZER.getName());
		defaultValues.put(NetworkConfig.ENCRYPTER_CLASSNAME, DEFAULT_EVENT_ENCRYPTER.getName());
	}
704579
public String getCookie(String name, String defaultValue) {
		Cookie cookie = getCookieObject(name);
		return cookie != null ? cookie.getValue() : defaultValue;
	}
1299281
public static boolean getBooleanValue(Properties prop, String name, boolean defaultValue) {
		String strProp = prop.getProperty(name, Boolean.toString(defaultValue));
		return Boolean.valueOf(strProp);
	}
1284473
public String get(String key, String defaultValue) {
        String value = parameters.get(key);
        return StringUtils.isBlank(value) ? defaultValue : value;
    }
220238
public Object getFieldDefaultValue(TypeElement type, String name) {
		return this.defaultValues.computeIfAbsent(type, this::resolveFieldValues)
				.get(name);
	}
1047927
public String getAsString(final String name, final String defaultValue) {
        return AtsdUtil.getPropertyStringValue(fullName(name), clientProperties, defaultValue);
    }
1054530
public static String get(String name, String defaultValue) {
		return StrUtil.nullToDefault(get(name, false), defaultValue);
	}
460312
public String getOutputProperty(String name) {
        String val = getOutputPropertyNonDefault(name);
        // If no explicit value, try to get the default value
        if (val == null)
            val = getOutputPropertyDefault(name);
        return val;
        
    }
1069927
public boolean getBooleanProperty(String propertyName, boolean defaultValue) {

		return Boolean.valueOf(getProperty(propertyName, Boolean.toString(defaultValue)));
	}
1032572
public String getParameterAsString(String name, String defaultValue) {
		return defaultValue(blankToNull(getParameter(name)), defaultValue);
	}
327458
private static String getProperty(String prefix, String name, String defaultValue) {
        return System.getProperty(prefix + name, defaultValue);
    }
1106501
public String getProperty(String key, String defaultValue) {
        return mProperties.getProperty(key, defaultValue);
    }
637479
boolean getBooleanProperty(String name, boolean defaultValue) {
        String val = getProperty(name);
        if (val == null) {
            return defaultValue;
        }
        val = val.toLowerCase();
        if (val.equals("true") || val.equals("1")) {
            return true;
        } else if (val.equals("false") || val.equals("0")) {
            return false;
        }
        return defaultValue;
    }
1243273
public static void getDefaultValues(Properties defaultValues) {
        defaultValues.put(BOOT_AGENT, ""); //$NON-NLS-1$
        defaultValues.put(BOOT_AGENT_ID, ""); //$NON-NLS-1$
        defaultValues.put(BOOT_DEFAULT_CONTEXT_ID_NAME, BOOT_DEFAULT_CONTEXT_ID_VALUE.toString());
        defaultValues.put(DEFAULT_CONTEXT_ID_NAME, DEFAULT_CONTEXT_ID_VALUE);
        defaultValues.put(DEFAULT_SPACE_ID_NAME, DEFAULT_SPACE_ID_VALUE);
        defaultValues.put(OFFLINE, Boolean.FALSE.toString());
        defaultValues.put(PUB_URI, ""); //$NON-NLS-1$
        defaultValues.put(RANDOM_DEFAULT_CONTEXT_ID_NAME, RANDOM_DEFAULT_CONTEXT_ID_VALUE.toString());
        defaultValues.put(VERBOSE_LEVEL_NAME, VERBOSE_LEVEL_VALUE);
        defaultValues.put(HAZELCAST_LOGGER_FACTORY_NAME, HAZELCAST_LOGGER_FACTORY_VALUE);
        defaultValues.put(MIN_NUMBER_OF_THREADS_IN_EXECUTOR_NAME, Integer.toString(MIN_NUMBER_OF_THREADS_IN_EXECUTOR_VALUE));
        defaultValues.put(MAX_NUMBER_OF_THREADS_IN_EXECUTOR_NAME, Integer.toString(MAX_NUMBER_OF_THREADS_IN_EXECUTOR_VALUE));
        defaultValues.put(KERNEL_THREAD_TIMEOUT_NAME, Integer.toString(KERNEL_THREAD_TIMEOUT_VALUE));
        defaultValues.put(KERNEL_THREAD_PURGE_DELAY_NAME, Integer.toString(KERNEL_THREAD_PURGE_DELAY_VALUE));
        defaultValues.put(INJECTION_MODULE_NAME, INJECTION_MODULE_NAME_VALUE);
        defaultValues.put(JANUS_LOGO_SHOW_NAME, JANUS_LOGO_SHOW.toString());
        defaultValues.put(JANUS_PROGRAM_NAME, JANUS_PROGRAM_NAME_VALUE);
    }