Home | History | Annotate | Download | only in jline

Lines Matching refs:candidates

40     public boolean complete(final ConsoleReader reader, final List candidates,
45 if (candidates.size() == 1) {
46 String value = candidates.get(0).toString();
56 } else if (candidates.size() > 1) {
57 String value = getUnambiguousCompletions(candidates);
64 printCandidates(reader, candidates, eagerNewlines);
84 * Print out the candidates. If the size of the candidates
88 * @param candidates the list of candidates to print
91 Collection candidates, boolean eagerNewlines)
93 Set distinct = new HashSet(candidates);
99 (loc.getString("display-candidates"), new Object[] {
100 new Integer(candidates .size())
107 String noOpt = loc.getString("display-candidates-no");
108 String yesOpt = loc.getString("display-candidates-yes");
127 if (distinct.size() != candidates.size()) {
130 for (Iterator i = candidates.iterator(); i.hasNext();) {
138 candidates = copy;
142 reader.printColumns(candidates);
152 private final String getUnambiguousCompletions(final List candidates) {
153 if ((candidates == null) || (candidates.size() == 0)) {
159 (String[]) candidates.toArray(new String[candidates.size()]);
176 * @return true is all the elements of <i>candidates</i>
180 final String[] candidates) {
181 for (int i = 0; i < candidates.length; i++) {
182 if (!candidates[i].startsWith(starts)) {