From 211b1b5612e3dec8cb14470e6a65c5fbe8e975b8 Mon Sep 17 00:00:00 2001 From: snuyanzin Date: Mon, 14 Oct 2019 11:40:26 +0200 Subject: [PATCH] Add constructor with collection of Candidates --- .../org/jline/reader/impl/completer/StringsCompleter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reader/src/main/java/org/jline/reader/impl/completer/StringsCompleter.java b/reader/src/main/java/org/jline/reader/impl/completer/StringsCompleter.java index 112f3af71..b9818fd8b 100644 --- a/reader/src/main/java/org/jline/reader/impl/completer/StringsCompleter.java +++ b/reader/src/main/java/org/jline/reader/impl/completer/StringsCompleter.java @@ -48,6 +48,11 @@ public StringsCompleter(Candidate ... candidates) { this.candidates.addAll(Arrays.asList(candidates)); } + public StringsCompleter(Collection candidates) { + assert candidates != null; + this.candidates.addAll(candidates); + } + public void complete(LineReader reader, final ParsedLine commandLine, final List candidates) { assert commandLine != null; assert candidates != null;