Runnable (String option) { TaskRepository matched = ContainerUtil.find(myRepositories, repository -> repository.getRepositoryType().getName().contains(option)); return matched == null ? null : () -> myRepositoriesList.setSelectedValue(matched, true); }