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.AbstractList; |
18 |
| import java.util.List; |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| public final class ElementsInnerProxyList extends AbstractList |
29 |
| { |
30 |
| private List _inner; |
31 |
| private ConfigurationPointImpl _point; |
32 |
| private ElementsProxyList _outer; |
33 |
| |
34 |
533
| ElementsInnerProxyList(ConfigurationPointImpl point, ElementsProxyList outer)
|
35 |
| { |
36 |
533
| _point = point;
|
37 |
533
| _outer = outer;
|
38 |
| |
39 |
533
| _outer.setInner(this);
|
40 |
| } |
41 |
| |
42 |
529
| private synchronized List inner()
|
43 |
| { |
44 |
529
| if (_inner == null)
|
45 |
| { |
46 |
529
| _inner = _point.constructElements();
|
47 |
| |
48 |
| |
49 |
526
| _outer.setInner(_inner);
|
50 |
| } |
51 |
| |
52 |
526
| return _inner;
|
53 |
| } |
54 |
| |
55 |
2
| public Object get(int index)
|
56 |
| { |
57 |
2
| return inner().get(index);
|
58 |
| } |
59 |
| |
60 |
526
| public int size()
|
61 |
| { |
62 |
526
| return inner().size();
|
63 |
| } |
64 |
| |
65 |
1
| public boolean equals(Object o)
|
66 |
| { |
67 |
1
| if (this == o)
|
68 |
0
| return true;
|
69 |
| |
70 |
1
| if (o == null)
|
71 |
0
| return false;
|
72 |
| |
73 |
1
| return inner().equals(o);
|
74 |
| } |
75 |
| |
76 |
0
| public int hashCode()
|
77 |
| { |
78 |
0
| return inner().hashCode();
|
79 |
| } |
80 |
| |
81 |
1
| public synchronized String toString()
|
82 |
| { |
83 |
1
| if (_inner != null)
|
84 |
0
| return _inner.toString();
|
85 |
| |
86 |
1
| return "<Element List Proxy for " + _point.getExtensionPointId() + ">";
|
87 |
| } |
88 |
| |
89 |
| } |