Clover Coverage Report - AnCal Coverage Report
Coverage timestamp: gio dic 18 2014 12:18:42 EST
../../../../img/srcFileCovDistChart0.png 94% of files have more coverage
10   47   6   2
2   33   0,6   5
5     1,2  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  MessageType       Line # 10 10 6 0% 0.0
 
No Tests
 
1    package pl.magot.vetch.ancal;
2   
3    import java.util.NoSuchElementException;
4   
5    import pl.magot.vetch.ancal.R;
6   
7    /**
8    * Represents type of a message shown in a messagebox.
9    */
 
10    public enum MessageType {
11    INFO(1, R.string.msgTypeInfo, R.drawable.msgicon_info),
12    WARNING(2, R.string.msgTypeWarning, R.drawable.msgicon_warning),
13    ERROR(3, R.string.msgTypeError, R.drawable.msgicon_error);
14   
15   
 
16  0 toggle public static MessageType create(int id) {
17  0 for (MessageType type : values()) {
18  0 if (type.getId() == id) {
19  0 return type;
20    }
21    }
22   
23  0 throw new NoSuchElementException("unknown message type (id = " + id + ")!");
24    }
25   
26    private final int typeId;
27    private final int titleId;
28    private final int iconId;
29   
 
30  0 toggle private MessageType(int id, int title, int icon) {
31  0 typeId = id;
32  0 titleId = title;
33  0 iconId = icon;
34    }
35   
 
36  0 toggle public int getId() {
37  0 return typeId;
38    }
39   
 
40  0 toggle public int getTitle() {
41  0 return titleId;
42    }
43   
 
44  0 toggle public int getIcon() {
45  0 return iconId;
46    }
47    }