値がnullの場合、defaultValueの値を返す。
@param locale ロケール
@param key メッセージキー
@param defaultValue
@return 該当するロケールのメッセージが見つからない場合は、引数で指定した'defaultValue'の値を返す。
777354
public String getMessage(final Locale locale, final String key, final String defaultValue) {
        String message = getMessage(locale, key);
        return message == null ? defaultValue : message;
    }
545225
@Override
    public final Integer optInt(final String key, final Integer defaultValue) {
        Integer result = optInt(key);
        return result == null ? defaultValue : result;
    }
996031
public static String getValueWithGlobalDefault(String section, ConfigConstant key) {
    String value = getValue(section, key);
    return (Strings.isNullOrEmpty(value) ? getGlobalValue(key) : value);
  }
701255
public <T> T get(String key, T defaultValue) {
        if (map.containsKey(key)) {
            Object value = map.get(key);
            return (T)(value instanceof byte[] ? unmarshall((byte[])value) : value);
        }
        return defaultValue;
    }
561648
public String getFormatStringWithoutDefaulting(Locale locale, String key) {
        for (String s : toStrings(locale)) {
            String msg = get(s).getProperty(key);
            if(msg!=null && msg.length()>0)
                return msg;
        }
        return null;
    }
252219
@Override
    public final long optLong(final String key, final long defaultValue) {
        Long result = optLong(key);
        return result == null ? defaultValue : result;
    }
215629
public static LocaleData get(Locale locale) {
        if (locale == null) {
            throw new NullPointerException("locale == null");
        }

        final String languageTag = locale.toLanguageTag();
        synchronized (localeDataCache) {
            LocaleData localeData = localeDataCache.get(languageTag);
            if (localeData != null) {
                return localeData;
            }
        }
        LocaleData newLocaleData = initLocaleData(locale);
        synchronized (localeDataCache) {
            LocaleData localeData = localeDataCache.get(languageTag);
            if (localeData != null) {
                return localeData;
            }
            localeDataCache.put(languageTag, newLocaleData);
            return newLocaleData;
        }
    }
263809
public char getChar( String key, char defaultValue )
        throws MissingResourceException
    {
        try
        {
            return getChar( key );
        }
        catch( MissingResourceException mre )
        {
            return 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());
    }
573770
@Override
    public final String optString(final String key, final String defaultValue) {
        String result = optString(key);
        return result == null ? defaultValue : result;
    }
826731
public String getMessage(String key, Locale locale)
	{
		if (null == locale)
		{
			return getMessage(key);
		}
		return CollectionTools.getString(getResourceBundle(locale), key, getBehaviourOnMissingMessage().getValueOnMissingMessage(key));
	}
1053242
public static LocalizedMessages getInstance(Locale locale)
  {
    LocalizedMessages instance = null;

    if (locale == null)
    {
      locale = Locale.getDefault();
    }

    String localeKey = locale.getLanguage();
    if (localizedMessages.containsKey(localeKey))
    {
      instance = localizedMessages.get(localeKey);
    } 
    else
    {
      synchronized (LocalizedMessages.class)
      {
        if (instance == null)
        {
          instance = new LocalizedMessages(locale);
          localizedMessages.put(localeKey, instance);
        }
      }
    }

    return instance;
  }
727588
public Locale getLocaleOrDefault(String language) {
        String lang = getLanguageOrDefault(language);
        return Locale.forLanguageTag(lang);
    }
472721
public String getMessage(final MSLocale locale, final String key) {
        if(locale == null) {
            return loadResource(null).getMessage(key);

        } else {
            return loadResource(locale.getLocale()).getMessage(key);
        }
    }
744270
static String valueAsString(Map<String, Object> map, Key key, String defaultValue) {
        Validate.notNullOrEmpty(key.key, "Key for plugin configuration must be set");
        if (map.containsKey(key.key)) {
            return map.get(key.key).toString().length() == 0 ? defaultValue : map.get(key.key).toString();
        }
        return defaultValue;
    }
616667
function defaultLocale() {
		var sLocale;
		// use the current session locale, if available
		if (window.sap && window.sap.ui && sap.ui.getCore) {
			sLocale = sap.ui.getCore().getConfiguration().getLanguage();
			sLocale = normalize(sLocale);
		}
		// last fallback is english if no or no valid locale is given
		return sLocale || "en";
	}
35033
public String getText(String key, String defaultValue, Object... args) {
    String text = doGetText(key);
    if (null == text) text = (null == defaultValue && keyAsDefault) ? key : defaultValue;
    if (null != text && args.length > 0) return formater.format(text, locale, args);
    return text;
  }