class AutoCompleteUtils {

  @Nonnull
  public static List<AutocompleteSuggestion> stringAutoComplete(
      @Nullable String query, Set<String> strings) {

    String testQuery = query == null ? "" : query.toLowerCase();

    return strings.stream()
        .filter(s -> s.toLowerCase().contains(testQuery))
        .map(s -> new AutocompleteSuggestion(s, false))
        .collect(ImmutableList.toImmutableList());
  }

}