Parent Directory
|
Revision Log
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 |