Set the default value.

@param defaultValue the default value
@return this
181590
public DoubleParameter setDefaultValue(double defaultValue) {
		super.setDefaultValue(defaultValue);

		if (hasMinimumValue) {
			if (minimumValueInclusive) {
				Util.checkParameter(defaultValue >= minimumValue,
					"Default value (" + defaultValue + ") must be greater than or equal to minimum (" + minimumValue + ")");
			} else {
				Util.checkParameter(defaultValue > minimumValue,
					"Default value (" + defaultValue + ") must be greater than minimum (" + minimumValue + ")");
			}
		}

		if (hasMaximumValue) {
			if (maximumValueInclusive) {
				Util.checkParameter(defaultValue <= maximumValue,
					"Default value (" + defaultValue + ") must be less than or equal to maximum (" + maximumValue + ")");
			} else {
				Util.checkParameter(defaultValue < maximumValue,
					"Default value (" + defaultValue + ") must be less than maximum (" + maximumValue + ")");
			}
		}

		return this;
	}
177665
public function setDefaultValue($value): Property
    {
        $this->hasDefault = true;
        $this->defaultValue = $value;

        return $this;
    }
794669
public static <T> T selectValue(T defaultValue, T... overrides) {
        for (T override : overrides) {
            if (override != null) {
                return override;
            }
        }
        return defaultValue;
    }
481065
public static Object toNull(Object value, Object defaultValue) {
	if (value == null) return null;
	if (value instanceof String && Caster.toString(value, "").trim().length() == 0) return null;
	if (value instanceof Number && ((Number) value).intValue() == 0) return null;
	return defaultValue;
    }
526508
public String getValueWithDefault(String keyMsgType, String defaultVal) {
        return keyToValue.getOrDefault(keyMsgType, defaultVal);
    }
1118378
public java.lang.String getRetOrDefault(
      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 =
        internalGetRet().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
255812
public static DefaultValueFunction defaultValue(Field field, Object defaultValue) {

		Assert.notNull(field, "Field must not be 'null' for default value operation.");

		return new DefaultValueFunction(field, defaultValue);
	}
1058578
public Charset charset(Charset defaultValue) {
        return charset != null ? Charset.forName(charset) : defaultValue;
    }
1298451
public static DefaultValueFunction defaultValue(String fieldName, Object defaultValue) {

		Assert.hasText(fieldName, "Fieldname must not be 'empty' for default value operation.");
		Assert.notNull(defaultValue, "DefaultValue must not be 'null'.");

		return defaultValue(new SimpleField(fieldName), defaultValue);
	}
986122
public String getDefaultValue() {

        String value = null;
        if (!m_defaultValues.isEmpty()) {
            value = m_defaultValues.get(m_defaultValues.size() - 1);
        }
        return value;
    }
531626
public static <T> T defaultIfAbsent(T newValue, T defaultValue) {
    return ofNullable(newValue)
        .orElse(ofNullable(defaultValue)
        .orElse(null));
  }
126846
public String get(String key, String defaultValue) {
        String v = get(key);
        if (v==null)    v=defaultValue;
        return v;
    }
576993
public static <V> FieldScopeLogicMap<V> defaultValue(V value) {
    return new FieldScopeLogicMap<>(ImmutableList.of(Entry.of(FieldScopeLogic.all(), value)));
  }
1222404
public Chunks withDefault(int defaultValue) {
        this.defaultValue = defaultValue;
        if (defaultValue != 0) {
            for (int[] chunk : chunks) {
                Arrays.fill(chunk, defaultValue);
            }
        }
        return this;
    }
487107
public function setDefaultValue($defaultValue)
    {
        if (is_float($defaultValue)) {
            $this->defaultValue = $defaultValue;
        } else {
            $msg = "The defaultValue argument must be a numeric value, '" . gettype($defaultValue) . "'.";
            throw new InvalidArgumentException($msg);
        }
    }
1034312
public String getProperty(String key, String defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : value;
    }
783410
public String optString(String key, String defaultValue) {
    Object o = opt(key);
    return o != null ? o.toString() : defaultValue;
  }