public final boolean addResourceBundle(final ResourceBundle resourceBundle) {
        Objects.requireNonNull(resourceBundle, "resourceBundle should not be null.");
        
        if(messageBundles.contains(resourceBundle)) {
            return false;
        }
        
        messageBundles.addFirst(resourceBundle);
        final List<String> keys = new ArrayList<String>();
        
        for(final Enumeration<String> keysEnum = resourceBundle.getKeys(); keysEnum.hasMoreElements();) {
            keys.add(keysEnum.nextElement());
        }
        
        messageBundleKeys.put(resourceBundle, keys);
        
        return true;
    }
public final boolean addResourceBundle ( final ResourceBundle resourceBundle ) { Objects . requireNonNull ( resourceBundle , "resourceBundle should not be null." ) ; if ( messageBundles . contains ( resourceBundle ) ) { return false ; } messageBundles . addFirst ( resourceBundle ) ; final List < String > keys = new ArrayList < String > ( ) ; for ( final Enumeration < String > keysEnum = resourceBundle . getKeys ( ) ; keysEnum . hasMoreElements ( ) ; ) { keys . add ( keysEnum . nextElement ( ) ) ; } messageBundleKeys . put ( resourceBundle , keys ) ; return true ; }
メッセージソースを追加します。
@param resourceBundle 追加するメッセージソース。
@return 既に追加済みの場合はfalseを返します。
@throws NullPointerException resourceBundle is null.