Skip to content

Commit

Permalink
Add constructor with collection of Candidates
Browse files Browse the repository at this point in the history
  • Loading branch information
snuyanzin committed Oct 14, 2019
1 parent 389ec83 commit 211b1b5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public StringsCompleter(Candidate ... candidates) {
this.candidates.addAll(Arrays.asList(candidates));
}

public StringsCompleter(Collection<Candidate> candidates) {
assert candidates != null;
this.candidates.addAll(candidates);
}

public void complete(LineReader reader, final ParsedLine commandLine, final List<Candidate> candidates) {
assert commandLine != null;
assert candidates != null;
Expand Down

0 comments on commit 211b1b5

Please sign in to comment.