@Test public void testCompletionEmpty() { String query = ""; assertThat( getTestPAC(query).run(), containsInAnyOrder( new ParboiledAutoCompleteSuggestion("(", query.length(), NODE_PARENS), new ParboiledAutoCompleteSuggestion("!", query.length(), IP_PROTOCOL_NOT), new ParboiledAutoCompleteSuggestion("/", query.length(), NODE_NAME_REGEX), new ParboiledAutoCompleteSuggestion( "@specifier(", query.length(), REFERENCE_BOOK_AND_ADDRESS_GROUP))); }
Set<ParboiledAutoCompleteSuggestion> run() { Set<PotentialMatch> potentialMatches = getPotentialMatches(_query); return potentialMatches.stream() .map(this::autoCompletePotentialMatch) .flatMap(Collection::stream) .collect(ImmutableSet.toImmutableSet()); }
ParboiledAutoComplete { Set<ParboiledAutoCompleteSuggestion> run() { Set<PotentialMatch> potentialMatches = getPotentialMatches(_query); return potentialMatches.stream() .map(this::autoCompletePotentialMatch) .flatMap(Collection::stream) .collect(ImmutableSet.toImmutableSet()); } }
ParboiledAutoComplete { Set<ParboiledAutoCompleteSuggestion> run() { Set<PotentialMatch> potentialMatches = getPotentialMatches(_query); return potentialMatches.stream() .map(this::autoCompletePotentialMatch) .flatMap(Collection::stream) .collect(ImmutableSet.toImmutableSet()); } ParboiledAutoComplete(
      CommonParser parser,
      Grammar grammar,
      Map<String, Anchor.Type> completionTypes,
      String network,
      String snapshot,
      String query,
      int maxSuggestions,
      CompletionMetadata completionMetadata,
      NodeRolesData nodeRolesData,
      ReferenceLibrary referenceLibrary);   ParboiledAutoComplete(
      Grammar grammar,
      Rule inputRule,
      Map<String, Anchor.Type> completionTypes,
      String network,
      String snapshot,
      String query,
      int maxSuggestions,
      CompletionMetadata completionMetadata,
      NodeRolesData nodeRolesData,
      ReferenceLibrary referenceLibrary); }
ParboiledAutoComplete { Set<ParboiledAutoCompleteSuggestion> run() { Set<PotentialMatch> potentialMatches = getPotentialMatches(_query); return potentialMatches.stream() .map(this::autoCompletePotentialMatch) .flatMap(Collection::stream) .collect(ImmutableSet.toImmutableSet()); } ParboiledAutoComplete(
      CommonParser parser,
      Grammar grammar,
      Map<String, Anchor.Type> completionTypes,
      String network,
      String snapshot,
      String query,
      int maxSuggestions,
      CompletionMetadata completionMetadata,
      NodeRolesData nodeRolesData,
      ReferenceLibrary referenceLibrary);   ParboiledAutoComplete(
      Grammar grammar,
      Rule inputRule,
      Map<String, Anchor.Type> completionTypes,
      String network,
      String snapshot,
      String query,
      int maxSuggestions,
      CompletionMetadata completionMetadata,
      NodeRolesData nodeRolesData,
      ReferenceLibrary referenceLibrary); static List<AutocompleteSuggestion> autoComplete(
      Grammar grammar,
      String network,
      String snapshot,
      String query,
      int maxSuggestions,
      CompletionMetadata completionMetadata,
      NodeRolesData nodeRolesData,
      ReferenceLibrary referenceLibrary); }
ParboiledAutoComplete { Set<ParboiledAutoCompleteSuggestion> run() { Set<PotentialMatch> potentialMatches = getPotentialMatches(_query); return potentialMatches.stream() .map(this::autoCompletePotentialMatch) .flatMap(Collection::stream) .collect(ImmutableSet.toImmutableSet()); } ParboiledAutoComplete(
      CommonParser parser,
      Grammar grammar,
      Map<String, Anchor.Type> completionTypes,
      String network,
      String snapshot,
      String query,
      int maxSuggestions,
      CompletionMetadata completionMetadata,
      NodeRolesData nodeRolesData,
      ReferenceLibrary referenceLibrary);   ParboiledAutoComplete(
      Grammar grammar,
      Rule inputRule,
      Map<String, Anchor.Type> completionTypes,
      String network,
      String snapshot,
      String query,
      int maxSuggestions,
      CompletionMetadata completionMetadata,
      NodeRolesData nodeRolesData,
      ReferenceLibrary referenceLibrary); static List<AutocompleteSuggestion> autoComplete(
      Grammar grammar,
      String network,
      String snapshot,
      String query,
      int maxSuggestions,
      CompletionMetadata completionMetadata,
      NodeRolesData nodeRolesData,
      ReferenceLibrary referenceLibrary);  }