void (final @NotNull Collection<? extends TypeHandler> values) { ActionListener l = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { radioSelected(true); } }; for (TypeHandler typeHandler : values) { typeHandler.getRadioButton().addActionListener(l); } }