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

see #8465 - use diamond operator where applicable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java

    r6890 r7005  
    141141    }
    142142
    143     private final Set<Tag> tags = new HashSet<Tag>();
     143    private final Set<Tag> tags = new HashSet<>();
    144144
    145145    /**
     
    469469     */
    470470    public Set<Tag> asSet() {
    471         return new HashSet<Tag>(tags);
     471        return new HashSet<>(tags);
    472472    }
    473473
     
    479479     */
    480480    public List<Tag> asList() {
    481         return new ArrayList<Tag>(tags);
     481        return new ArrayList<>(tags);
    482482    }
    483483
     
    498498     */
    499499    public Set<String> getKeys() {
    500         HashSet<String> ret = new HashSet<String>();
     500        HashSet<String> ret = new HashSet<>();
    501501        for (Tag tag: tags) {
    502502            ret.add(tag.getKey());
     
    511511     */
    512512    public Set<String> getKeysWithMultipleValues() {
    513         HashMap<String, Integer> counters = new HashMap<String, Integer>();
     513        HashMap<String, Integer> counters = new HashMap<>();
    514514        for (Tag tag: tags) {
    515515            Integer v = counters.get(tag.getKey());
    516516            counters.put(tag.getKey(),(v==null) ? 1 : v+1);
    517517        }
    518         Set<String> ret = new HashSet<String>();
     518        Set<String> ret = new HashSet<>();
    519519        for (Entry<String, Integer> e : counters.entrySet()) {
    520520            if (e.getValue() > 1) {
     
    556556     */
    557557    public Set<String> getValues() {
    558         HashSet<String> ret = new HashSet<String>();
     558        HashSet<String> ret = new HashSet<>();
    559559        for (Tag tag: tags) {
    560560            ret.add(tag.getValue());
     
    572572     */
    573573    public Set<String> getValues(String key) {
    574         HashSet<String> ret = new HashSet<String>();
     574        HashSet<String> ret = new HashSet<>();
    575575        if (key == null) return ret;
    576576        for (Tag tag: tags) {
     
    733733        }
    734734
    735         Set<String> values = new LinkedHashSet<String>();
    736         Map<String, Collection<String>> originalSplitValues = new LinkedHashMap<String, Collection<String>>();
     735        Set<String> values = new LinkedHashSet<>();
     736        Map<String, Collection<String>> originalSplitValues = new LinkedHashMap<>();
    737737        for (String v : originalValues) {
    738738            List<String> vs = Arrays.asList(SPLIT_VALUES_PATTERN.split(v));
Note: See TracChangeset for help on using the changeset viewer.