1 changed files with 20 additions and 0 deletions
@ -0,0 +1,20 @@
|
||||
package org.leolo.map.osm.extract.format; |
||||
|
||||
import org.leolo.map.osm.extract.SearchProvider; |
||||
import org.leolo.map.osm.extract.model.SearchItem; |
||||
|
||||
@SearchProvider(searchKey = "name") |
||||
public class SimpleStringSearchProvider extends SearchItem { |
||||
|
||||
private String searchKey; |
||||
|
||||
@Override |
||||
protected boolean matchString(String target) { |
||||
return searchKey.equalsIgnoreCase(target.strip()); |
||||
} |
||||
|
||||
@Override |
||||
public void setSearchKey(String searchKey) { |
||||
this.searchKey = searchKey.strip(); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue