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