OSDN Git Service

Remove Date tag of Subversion
[stigmata/stigmata.git] / src / main / java / jp / sourceforge / stigmata / event / WarningMessages.java
1 package jp.sourceforge.stigmata.event;
2
3 /*
4  * $Id$
5  */
6
7 import java.util.HashMap;
8 import java.util.Iterator;
9 import java.util.Map;
10
11 /**
12  * 
13  * @author Haruaki Tamada
14  * @version $Revision$ 
15  */
16 public class WarningMessages{
17     private OperationType type;
18     private Map<Exception, String> messages = new HashMap<Exception, String>();
19
20     public WarningMessages(OperationType type){
21         this.type = type;
22     }
23
24     public void addMessage(Exception e, String string){
25         messages.put(e, string);
26     }
27
28     public Iterator<Exception> exceptions(){
29         return messages.keySet().iterator();
30     }
31
32     public String getString(Exception e){
33         return messages.get(e);
34     }
35
36     public OperationType getType(){
37         return type;
38     }
39
40     public void setType(OperationType type){
41         this.type = type;
42     }
43
44     public int getWarningCount(){
45         return messages.size();
46     }
47 }