/** * Adds a binding for <code>key</code> to <code>action</code>. * If <code>action</code> is null, this removes the current binding * for <code>key</code>. * <p>In most instances, <code>key</code> will be * <code>action.getValue(NAME)</code>. * * @param key the key for the action. * @param action the action to be added. */ public void put(final Object key, final Action action) { if (action == null) { remove(key); } else { if (this.actionMap.containsKey(key)) { remove(key); } this.actionMap.put(key, action); this.actionList.add (key); } }
/** * Adds a binding for <code>key</code> to <code>action</code>. * If <code>action</code> is null, this removes the current binding * for <code>key</code>. * <p>In most instances, <code>key</code> will be * <code>action.getValue(NAME)</code>. * * @param key the key for the action. * @param action the action to be added. */ public void put(final Object key, final Action action) { if (action == null) { remove(key); } else { if (this.actionMap.containsKey(key)) { remove(key); } this.actionMap.put(key, action); this.actionList.add (key); } }
/** * Adds a binding for <code>key</code> to <code>action</code>. * If <code>action</code> is null, this removes the current binding * for <code>key</code>. * <p>In most instances, <code>key</code> will be * <code>action.getValue(NAME)</code>. * * @param key the key for the action. * @param action the action to be added. */ public void put(final Object key, final Action action) { if (action == null) { remove(key); } else { if (this.actionMap.containsKey(key)) { remove(key); } this.actionMap.put(key, action); this.actionList.add (key); } }