Skip to content

Commit

Permalink
Merge pull request #445 from snuyanzin/JLINE3_COLLECTION_OF_CANDIDATES
Browse files Browse the repository at this point in the history
Add constructor with collection of Candidates
  • Loading branch information
mattirn authored Oct 14, 2019
2 parents bd23dac + 211b1b5 commit e7d15fd
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 e7d15fd

Please sign in to comment.