Range<Integer> (SearchEverywhereContributor<?> contributor) { List<SearchEverywhereContributor> contributorsList = contributors(); int first = contributorsList.indexOf(contributor); if (first < 0) return null; int last = contributorsList.lastIndexOf(contributor); if (isMoreElement(last)) { last -= 1; } return new Range<>(first, last); }