void (@NotNull List<? extends JComponent> titleComponents) { for (ThreeSide side : ThreeSide.values()) { DiffContentPanel panel = side.select(myPanels); JComponent title = side.select(titleComponents); panel.setTitle(title); } }