public static MavenDependencyCompletionItem getMaxIcon(MavenArtifactSearchResult searchResult) {
    return Collections.max(Arrays.asList(searchResult.getSearchResults().getItems()),
                           Comparator.comparing(r -> {
                             if (r.getType() == null) {
                               return Integer.MIN_VALUE;
                             }
                             return r.getType().getWeight();
                           }));
  }
public static MavenDependencyCompletionItem getMaxIcon(MavenArtifactSearchResult searchResult)