Here you can find the source of addActionsToMap(Action[] list1, Map
Parameter | Description |
---|---|
list1 | non-noll list of actions |
h | non-null map as above |
public static void addActionsToMap(Action[] list1, Map<String, Action> h)
//package com.java2s; //License from project: Apache License import javax.swing.*; import java.util.*; public class Main { /**//from w w w . ja v a 2 s.c o m * add a col;lections of actions to a Map where the key is the action name * * @param list1 non-noll list of actions * @param h non-null map as above */ public static void addActionsToMap(Action[] list1, Map<String, Action> h) { for (int i = 0; i < list1.length; i++) { Action a = list1[i]; String value = (String) a.getValue(Action.NAME); h.put((value != null ? value : ""), a); } } }