PropertySetFilter.java

biz/hammurapi/properties/PropertySetFilter.java

Violations

Inspector Message Severity Location
Java Inspector 048 Copyrights information should be present in each file. 1
Java Inspector 089 Undocumented field 2 14:9
Java Inspector 089 Undocumented constructor 2 16:9
Java Inspector 089 Undocumented method 2 20:9
Java Inspector 089 Undocumented method 2 24:9
Java Inspector 089 Undocumented method 2 28:9
Java Inspector 089 Undocumented method 2 32:9
Java Inspector 089 Undocumented method 2 36:9
Java Inspector 089 Undocumented method 2 40:9
Java Inspector 089 Undocumented method 2 44:9
Java Inspector 089 Undocumented method 2 48:9
Java Inspector 089 Undocumented method 2 52:9
Java Inspector 089 Undocumented method 2 56:9
Java Inspector 089 Undocumented method 2 60:9
Java Inspector 051 It is good practice to call in any case super() in a constructor. 3 16:9

Source code

1package biz.hammurapi.properties;
2
3import java.util.Set;
4
5/**
6 * Delegates all calls to the master property set.
7 * Developers can override some methods, e.g. convert properties
8 * from one type to another.
9 * @author Pavel
10 *
11 */
12public class PropertySetFilter implements PropertySet {
13
14 protected PropertySet master;
15
16 public PropertySetFilter(PropertySet master) {
17 this.master = master;
18 }
19
20 public void clear() {
21 master.clear();
22 }
23
24 public boolean compareProperties(PropertySet otherSet) {
25 return master.compareProperties(otherSet);
26 }
27
28 public boolean containsAll(PropertySet subSet) {
29 return master.containsAll(subSet);
30 }
31
32 public Object get(String name) {
33 return master.get(name);
34 }
35
36 public Set getPropertyNames() {
37 return master.getPropertyNames();
38 }
39
40 public PropertySet getSubset(String prefix) {
41 return master.getSubset(prefix);
42 }
43
44 public void mount(String prefix, PropertySet source) {
45 master.mount(prefix, source);
46 }
47
48 public boolean remove(String name) {
49 return master.remove(name);
50 }
51
52 public void set(String name, Object value) {
53 master.set(name, value);
54 }
55
56 public void setAll(PropertySet source) {
57 master.setAll(source);
58 }
59
60 public Object get(String name, Object defaultValue) {
61 return master.get(name, defaultValue);
62 }
63
64
65}
66