Esempio n. 1
0
 /**
  * Performs the search specified by the search string {@code search} and the search mode {@code
  * mode} and returns the result of the search.
  *
  * @param search the search string to use
  * @param mode the search mode to use
  * @return The result of the search.
  * @since 10457
  */
 public static Collection<OsmPrimitive> searchAndReturn(String search, SearchMode mode) {
   final SearchSetting searchSetting = new SearchSetting();
   searchSetting.text = search;
   searchSetting.mode = mode;
   CapturingSearchReceiver receiver = new CapturingSearchReceiver();
   SearchTask.newSearchTask(searchSetting, receiver).run();
   return receiver.result;
 }
Esempio n. 2
0
 static void search(SearchSetting s) {
   SearchTask.newSearchTask(s, new SelectSearchReceiver()).run();
 }