@Test public void testToHint_shortenRelevances() { String hint = AutoCompleteUtils.toDescription( ImmutableList.of( new IpCompletionRelevance("match1", "match1"), new IpCompletionRelevance("match2", "match2"))); assertTrue(hint.contains("match1")); assertFalse(hint.contains("match2")); assertTrue(hint.contains("1 more")); }
@Nullable @VisibleForTesting static String toDescription(IpCompletionMetadata ipCompletionMetadata) { return toDescription(ipCompletionMetadata.getRelevances()); }
AutoCompleteUtils { @Nullable @VisibleForTesting static String toDescription(IpCompletionMetadata ipCompletionMetadata) { return toDescription(ipCompletionMetadata.getRelevances()); } }
AutoCompleteUtils { @Nullable @VisibleForTesting static String toDescription(IpCompletionMetadata ipCompletionMetadata) { return toDescription(ipCompletionMetadata.getRelevances()); }  }
AutoCompleteUtils { @Nullable @VisibleForTesting static String toDescription(IpCompletionMetadata ipCompletionMetadata) { return toDescription(ipCompletionMetadata.getRelevances()); }  @Nonnull static List<AutocompleteSuggestion> autoComplete(
      Variable.Type completionType, String query, int maxSuggestions); @Nonnull static List<AutocompleteSuggestion> autoComplete(
      @Nullable String network,
      @Nullable String snapshot,
      Variable.Type completionType,
      String query,
      int maxSuggestions,
      @Nullable CompletionMetadata completionMetadata,
      @Nullable NodeRolesData nodeRolesData,
      @Nullable ReferenceLibrary referenceLibrary); @Nonnull static List<AutocompleteSuggestion> autoComplete(
      @Nullable String network,
      @Nullable String snapshot,
      Variable.Type completionType,
      String query,
      int maxSuggestions,
      @Nullable CompletionMetadata completionMetadata,
      @Nullable NodeRolesData nodeRolesData,
      @Nullable ReferenceLibrary referenceLibrary,
      boolean fuzzyMatching); @Nonnull static List<AutocompleteSuggestion> baseAutoComplete(
      @Nullable String query, Set<String> allProperties); @Nonnull static List<AutocompleteSuggestion> stringAutoComplete(
      @Nullable String query, Set<String> strings); @Nonnull static List<AutocompleteSuggestion> stringAutoComplete(
      @Nullable String query, Map<String, Optional<String>> stringsWithDescriptions); @Nonnull static ImmutableList<AutocompleteSuggestion> ipStringAutoComplete(
      @Nullable String query, Map<Ip, IpCompletionMetadata> ips); }
AutoCompleteUtils { @Nullable @VisibleForTesting static String toDescription(IpCompletionMetadata ipCompletionMetadata) { return toDescription(ipCompletionMetadata.getRelevances()); }  @Nonnull static List<AutocompleteSuggestion> autoComplete(
      Variable.Type completionType, String query, int maxSuggestions); @Nonnull static List<AutocompleteSuggestion> autoComplete(
      @Nullable String network,
      @Nullable String snapshot,
      Variable.Type completionType,
      String query,
      int maxSuggestions,
      @Nullable CompletionMetadata completionMetadata,
      @Nullable NodeRolesData nodeRolesData,
      @Nullable ReferenceLibrary referenceLibrary); @Nonnull static List<AutocompleteSuggestion> autoComplete(
      @Nullable String network,
      @Nullable String snapshot,
      Variable.Type completionType,
      String query,
      int maxSuggestions,
      @Nullable CompletionMetadata completionMetadata,
      @Nullable NodeRolesData nodeRolesData,
      @Nullable ReferenceLibrary referenceLibrary,
      boolean fuzzyMatching); @Nonnull static List<AutocompleteSuggestion> baseAutoComplete(
      @Nullable String query, Set<String> allProperties); @Nonnull static List<AutocompleteSuggestion> stringAutoComplete(
      @Nullable String query, Set<String> strings); @Nonnull static List<AutocompleteSuggestion> stringAutoComplete(
      @Nullable String query, Map<String, Optional<String>> stringsWithDescriptions); @Nonnull static ImmutableList<AutocompleteSuggestion> ipStringAutoComplete(
      @Nullable String query, Map<Ip, IpCompletionMetadata> ips);  }