|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| package org.apache.hivemind.impl; |
|
16 |
| |
|
17 |
| import java.util.ArrayList; |
|
18 |
| import java.util.Collections; |
|
19 |
| import java.util.List; |
|
20 |
| |
|
21 |
| import org.apache.hivemind.internal.Contribution; |
|
22 |
| import org.apache.hivemind.internal.Module; |
|
23 |
| |
|
24 |
| |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| public final class ContributionImpl implements Contribution |
|
31 |
| { |
|
32 |
| private Module _contributingModule; |
|
33 |
| |
|
34 |
| private List _elements; |
|
35 |
| |
|
36 |
536
| public Module getContributingModule()
|
|
37 |
| { |
|
38 |
536
| return _contributingModule;
|
|
39 |
| } |
|
40 |
| |
|
41 |
679
| public void setContributingModule(Module module)
|
|
42 |
| { |
|
43 |
679
| _contributingModule = module;
|
|
44 |
| } |
|
45 |
| |
|
46 |
679
| public void addElements(List elements)
|
|
47 |
| { |
|
48 |
679
| if (_elements == null)
|
|
49 |
679
| _elements = new ArrayList(elements);
|
|
50 |
| else |
|
51 |
0
| _elements.addAll(elements);
|
|
52 |
| } |
|
53 |
| |
|
54 |
1216
| public List getElements()
|
|
55 |
| { |
|
56 |
1216
| if (_elements == null)
|
|
57 |
1
| return Collections.EMPTY_LIST;
|
|
58 |
| |
|
59 |
1215
| return _elements;
|
|
60 |
| } |
|
61 |
| } |