@Test public void testRunDynamicValueName() { String query = "node1"; CompletionMetadata completionMetadata = CompletionMetadata.builder().setNodes(ImmutableSet.of("node1", "node10")).build(); assertThat( ImmutableSet.copyOf(getTestPAC(query, completionMetadata).run()), equalTo( ImmutableSet.of( new ParboiledAutoCompleteSuggestion("node1", 0, NODE_NAME), new ParboiledAutoCompleteSuggestion("node10", 0, NODE_NAME), new ParboiledAutoCompleteSuggestion(",", query.length(), NODE_SET_OP)))); }
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);  }