List<OptionDescription> (@NotNull String configurableId, @NotNull Function<? super String, @Nls String> nameConverter) { List<CheckboxField> boxes = JBIterable.from(myFields).filter(CheckboxField.class).toList(); Object instance = getInstance(); return ContainerUtil.map(boxes, box -> new BooleanOptionDescription(nameConverter.apply(box.getTitle()), configurableId) { @Override public boolean isOptionEnabled() { return box.getValue(instance); } @Override public void setOptionState(boolean enabled) { box.setValue(instance, enabled); } }); }