MapContext.java
biz/hammurapi/config/MapContext.java
Violations
Inspector |
Message |
Severity |
Location |
Java Inspector 048 |
Copyrights information should be present in each file. |
1 |
|
Java Inspector 089 |
Type is not documented |
2 |
32:1
|
Java Inspector 089 |
Undocumented method |
2 |
37:9
|
Java Inspector 089 |
Undocumented constructor |
2 |
42:9
|
Java Inspector 089 |
Undocumented constructor |
2 |
46:9
|
Java Inspector 089 |
Undocumented method |
2 |
51:9
|
Java Inspector 051 |
It is good practice to call in any case super() in a constructor. |
3 |
42:9
|
Java Inspector 051 |
It is good practice to call in any case super() in a constructor. |
3 |
46:9
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23package biz.hammurapi.config;
24
25import java.util.Iterator;
26import java.util.Map;
27
28
29
30
31
32public class MapContext implements ContextEx {
33
34 private Map map;
35 private Context parent;
36
37 public Object get(String name) {
38 Object ret = map.get(name);
39 return ret==null && parent!=null ? parent.get(name) : ret;
40 }
41
42 public MapContext(Map map) {
43 this.map=map;
44 }
45
46 public MapContext(Map map, Context parent) {
47 this.map=map;
48 this.parent=parent;
49 }
50
51 public Iterator getNames() {
52 return map.keySet().iterator();
53 }
54}
55