01: package com.vividsolutions.jump.util;
02:
03: import java.util.Collection;
04: import java.util.List;
05:
06: public class LazyList extends ListWrapper {
07: private Block collectionFactory;
08:
09: private List list;
10:
11: public LazyList(Block collectionFactory) {
12: this .collectionFactory = collectionFactory;
13: }
14:
15: public Collection getCollection() {
16: if (list == null) {
17: list = (List) collectionFactory.yield();
18: }
19: return list;
20: }
21: }
|