void (@NotNull JComponent base, @NotNull JComponent dependant, String @NotNull ... actions) { HashMap<String, JComponent> map = new HashMap<>(); for (String action : actions) map.put(action, dependant); configureMapping(base, map::get); }