Ignore:
Timestamp:
2014-04-26T17:39:23+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - use diamond operator where applicable

Location:
trunk/src/org/openstreetmap/josm/actions/search
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r6844 r7005  
    8484    }
    8585
    86     private static final LinkedList<SearchSetting> searchHistory = new LinkedList<SearchSetting>();
     86    private static final LinkedList<SearchSetting> searchHistory = new LinkedList<>();
    8787    static {
    8888        for (String s: Main.pref.getCollection("search.history", Collections.<String>emptyList())) {
     
    110110            searchHistory.removeLast();
    111111        }
    112         LinkedHashSet<String> savedHistory = new LinkedHashSet<String>(searchHistory.size());
     112        LinkedHashSet<String> savedHistory = new LinkedHashSet<>(searchHistory.size());
    113113        for (SearchSetting item: searchHistory) {
    114114            savedHistory.add(item.writeToString());
     
    118118
    119119    public static List<String> getSearchExpressionHistory() {
    120         List<String> ret = new ArrayList<String>(getSearchHistory().size());
     120        List<String> ret = new ArrayList<>(getSearchHistory().size());
    121121        for (SearchSetting ss: getSearchHistory()) {
    122122            ret.add(ss.text);
     
    582582
    583583        final DataSet ds = Main.main.getCurrentDataSet();
    584         Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>(ds.getAllSelected());
     584        Collection<OsmPrimitive> sel = new HashSet<>(ds.getAllSelected());
    585585        int foundMatches = getSelection(s, sel, new Predicate<OsmPrimitive>(){
    586586            @Override
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r6990 r7005  
    5959    private static String  rxErrorMsgNoPos = marktr("The regex \"{0}\" had a parse error, full error:\n\n{1}");
    6060    private PushbackTokenizer tokenizer;
    61     private static Map<String, SimpleMatchFactory> simpleMatchFactoryMap = new HashMap<String, SimpleMatchFactory>();
    62     private static Map<String, UnaryMatchFactory> unaryMatchFactoryMap = new HashMap<String, UnaryMatchFactory>();
    63     private static Map<String, BinaryMatchFactory> binaryMatchFactoryMap = new HashMap<String, BinaryMatchFactory>();
     61    private static Map<String, SimpleMatchFactory> simpleMatchFactoryMap = new HashMap<>();
     62    private static Map<String, UnaryMatchFactory> unaryMatchFactoryMap = new HashMap<>();
     63    private static Map<String, BinaryMatchFactory> binaryMatchFactoryMap = new HashMap<>();
    6464
    6565    public SearchCompiler(boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) {
Note: See TracChangeset for help on using the changeset viewer.