source: trunk/org.etsi.common/src/org/etsi/common/logging/LoggingStatistics.java @ 43

Last change on this file since 43 was 7, checked in by phdmakk, 15 years ago
  • Property svn:mime-type set to text/plain
File size: 569 bytes
Line 
1package org.etsi.common.logging;
2
3import java.util.HashMap;
4
5import org.etsi.common.logging.LoggingInterface.MessageClass;
6
7
8//TODO: currently not in use
9public class LoggingStatistics {
10        private HashMap<MessageClass, Integer> statsMap = new HashMap<MessageClass, Integer>();
11       
12        public LoggingStatistics(){
13                for (MessageClass c : MessageClass.values()){
14                        this.statsMap.put(c, 0);
15                }
16        }
17       
18        public void addOccurence(MessageClass c){
19                this.statsMap.put(c, this.statsMap.get(c) + 1);
20        }
21       
22        public int getOccurences(MessageClass c){
23                return this.statsMap.get(c);
24        }
25}
Note: See TracBrowser for help on using the repository browser.