Esempio n. 1
0
 protected Selectable selectList(Selector selector, List<String> strings) {
   List<String> results = new ArrayList<String>();
   for (String string : strings) {
     List<String> result = selector.selectList(string);
     results.addAll(result);
   }
   return new PlainText(results);
 }
Esempio n. 2
0
 @Override
 public List<String> selectList(String text) {
   List<String> results = new ArrayList<String>();
   boolean first = true;
   for (Selector selector : selectors) {
     if (first) {
       results = selector.selectList(text);
       first = false;
     } else {
       List<String> resultsTemp = new ArrayList<String>();
       for (String result : results) {
         resultsTemp.addAll(selector.selectList(result));
       }
       results = resultsTemp;
       if (results == null || results.size() == 0) {
         return results;
       }
     }
   }
   return results;
 }