/*
Returns all values of an enum type split by pipe.
<tt>[ one | two | three]</tt>
@see org.kohsuke.args4j.spi.OptionHandler#getDefaultMetaVariable()
977781
@Override
    public String getDefaultMetaVariable() {
    	StringBuffer rv = new StringBuffer();
    	rv.append("[");
    	for (T t : enumType.getEnumConstants()) {
			rv.append(t).append(" | ");
		}
    	rv.delete(rv.length()-3, rv.length());
    	rv.append("]");
    	return rv.toString();
    }
869786
public static function getConstants($include_default = false)
    {
        static::loadValues();
        $enumConstants = static::$enumConstants[get_called_class()];
        if (!$include_default) {
            unset($enumConstants['__DEFAULT']);
        }
        return $enumConstants;
    }
885240
@Override
    boolean valuesAreTheSameAsDefault()
    {
        if (getDefaultValues() == null || getDefaultValues().size() == 0)
            return false;
        if (getValues() == null || getValues().size() == 0)
            return false;
        if (getDefaultValues().size() != getValues().size())
            return false;
        for (int v = 0; v < getDefaultValues().size(); v++)
        {
            if (isCaseSensitive() && !getDefaultValues().get(v).equals(getValues().get(v)))
                return false;
            if (!isCaseSensitive() && !getDefaultValues().get(v).equalsIgnoreCase(getValues().get(v)))
                return false;
        }
        return true;
    }
492019
public double getDouble(String pName, double defaultValue) {
        String pValue = _properties.getProperty(pName);
        return parseDouble(pName, pValue, defaultValue);
    }
142022
@Override
	public Map<String, VariantSet> getAvailableVariants(String mapping) {

		Map<String, VariantSet> availableVariants = new HashMap<>();
		String skinRootDir = getSkinRootDir(mapping, skinMapping.keySet());
		if (skinRootDir != null) {
			Map<String, VariantSet> variantSets = skinMapping.get(skinRootDir);
			for (VariantSet variantSet : variantSets.values()) {
				availableVariants.put(variantSet.getType(), variantSet);
			}
		}

		return availableVariants;
	}
511733
public Map<String, VariantSet> getAvailableVariants(String path) {

		Map<String, VariantSet> availableVariants = new TreeMap<>();
		ResourceGenerator generator = resolveResourceGenerator(path);
		if (generator != null) {
			if (generator instanceof VariantResourceGenerator) {

				Map<String, VariantSet> tempResult = ((VariantResourceGenerator) generator)
						.getAvailableVariants(generator.getResolver().getResourcePath(path));
				if (tempResult != null) {
					availableVariants = tempResult;
				}
			} else if (generator instanceof LocaleAwareResourceGenerator) {
				List<String> availableLocales = ((LocaleAwareResourceGenerator) generator)
						.getAvailableLocales(generator.getResolver().getResourcePath(path));
				if (availableLocales != null) {
					VariantSet variantSet = new VariantSet(JawrConstant.LOCALE_VARIANT_TYPE, "", availableLocales);
					availableVariants.put(JawrConstant.LOCALE_VARIANT_TYPE, variantSet);
				}
			}
		}

		return availableVariants;
	}
340683
public Datatype.Visibility getValueTypeVisibility() {
    Preconditions.checkState(
        !_unsetProperties.contains(Property.VALUE_TYPE_VISIBILITY), "valueTypeVisibility not set");
    return valueTypeVisibility;
  }
1063379
function $$getDefaultValue() {
      if (!injector) throw new Error("Injectable functions cannot be called at configuration time");
      var defaultValue = injector.invoke(config.$$fn);
      if (defaultValue !== null && defaultValue !== undefined && !self.type.is(defaultValue))
        throw new Error("Default value (" + defaultValue + ") for parameter '" + self.id + "' is not an instance of Type (" + self.type.name + ")");
      return defaultValue;
    }
386514
public static double getConfigDouble(String key, double defaultValue) {
		return NumberUtils.toDouble(getConfigParam(key, Double.toString(defaultValue)));
	}
610200
protected EnumerationValue[] getEnumConstants(final InputColumn<?> inputColumn,
            final ConfiguredPropertyDescriptor mappedEnumsProperty) {
        if (mappedEnumsProperty instanceof EnumerationProvider) {
            return ((EnumerationProvider) mappedEnumsProperty).values();
        } else {
            return EnumerationValue.fromArray(mappedEnumsProperty.getBaseType().getEnumConstants());
        }
    }
89038
public static double getDouble(String name, double defaultVal){
        if(getConfiguration().containsKey(name)){
            return getConfiguration().getDouble(name);
        } else {
            return defaultVal;
        }
    }
986122
public String getDefaultValue() {

        String value = null;
        if (!m_defaultValues.isEmpty()) {
            value = m_defaultValues.get(m_defaultValues.size() - 1);
        }
        return value;
    }
1362265
@Override
	public String getAvailableVariant(String variant, VariantSet variantSet) {

		String connectionType = variantSet.getDefaultVariant();
		if (variantSet.contains(variant)) {
			connectionType = variant;
		}

		return connectionType;
	}
133636
@CheckResult @NonNull
  public <T extends Enum<T>> Preference<T> getEnum(@NonNull String key, @NonNull T defaultValue,
      @NonNull Class<T> enumClass) {
    checkNotNull(key, "key == null");
    checkNotNull(defaultValue, "defaultValue == null");
    checkNotNull(enumClass, "enumClass == null");
    return new RealPreference<>(preferences, key, defaultValue, new EnumAdapter<>(enumClass), keyChanges);
  }
101874
public ArrayList<OvhDefaultSipDomains> availableDefaultSipDomains_GET(OvhSipDomainProductTypeEnum type) throws IOException {
		String qPath = "/telephony/availableDefaultSipDomains";
		StringBuilder sb = path(qPath);
		query(sb, "type", type);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t1);
	}
282534
public function getAllWithDefaultValue($bOnlySelectable = false)
    {
        $aAvailable = $this->getAll($bOnlySelectable);
        $aOut       = [];

        foreach ($aAvailable as $oType) {
            $sClassName = $oType->slug;
            if ($sClassName::SUPPORTS_DEFAULTS) {
                $aOut[] = $oType;
            }
        }

        return $aOut;
    }
591272
@Override
	public String getAvailableVariant(String variant, VariantSet variantSet) {
		String availableVariant = null;
		if (variantSet.contains(variant)) {
			availableVariant = variant;
		} else {
			String subVar = variant;
			while (subVar.indexOf('_') != -1) {
				subVar = subVar.substring(0, subVar.lastIndexOf('_'));
				if (variantSet.contains(subVar)) {
					availableVariant = subVar;
				}
			}
		}
		if (availableVariant == null) {
			availableVariant = variantSet.getDefaultVariant();
		}

		return availableVariant;
	}