/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/util/CountMap.java
ViewVC logotype

Annotation of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/util/CountMap.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3012 - (hide annotations) (download)
Wed Apr 20 13:51:24 2016 UTC (8 years, 2 months ago) by torben
File size: 376 byte(s)


1 torben 3012 package dk.daoas.adressevedligehold.util;
2    
3     import java.util.TreeMap;
4    
5     public class CountMap extends TreeMap<String, Integer> {
6    
7     private static final long serialVersionUID = 1L;//Default
8    
9     public void increment(String key) {
10     Integer count = this.get(key);
11     if (count == null) {
12     this.put(key, 1);
13     }
14     else {
15     this.put(key, count + 1);
16     }
17     }
18    
19     }

  ViewVC Help
Powered by ViewVC 1.1.20