1 | public final synchronized Iterator iterator() {↵ | | 1 | public final synchronized Iterator iterator() {↵
|
2 | if (isReference()) {↵ | | 2 | if (isReference()) {↵
|
3 | return ((BaseResourceCollectionContainer) getCheckedRef()).iterator();↵ | | 3 | return ((BaseResourceCollectionWrapper) getCheckedRef()).iterator();↵
|
4 | }↵ | | 4 | }↵
|
5 | dieOnCircularReference();↵ | | 5 | dieOnCircularReference();↵
|
6 | return new FailFast(this, cacheCollection().iterator());↵ | | 6 | return new FailFast(this, cacheCollection().iterator());↵
|
7 | }↵ | | 7 | }↵
|
|
8 | /**↵ | | 8 | /**↵
|
9 | * Fulfill the ResourceCollection contract.↵ | | 9 | * Fulfill the ResourceCollection contract.↵
|
10 | * @return number of elements as int.↵ | | 10 | * @return number of elements as int.↵
|
11 | */↵ | | 11 | */↵
|
12 | public synchronized int size() {↵ | | 12 | public synchronized int size() {↵
|
13 | if (isReference()) {↵ | | 13 | if (isReference()) {↵
|
14 | return ((BaseResourceCollectionContainer) getCheckedRef()).size();↵ | | 14 | return ((BaseResourceCollectionWrapper) getCheckedRef()).size();↵
|
15 | }↵ | | 15 | }↵
|
16 | dieOnCircularReference();↵ | | 16 | dieOnCircularReference();↵
|
17 | return cacheCollection().size(); | | 17 | return cacheCollection().size();
|