Changeset 8844
- Timestamp:
- 2004-12-17T14:51:50+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/DOMProxyListModel.java
r8380 r8844 192 192 } 193 193 194 public synchronized Object getElementAt(int index) { 194 public synchronized Object getElementAt(int index) 195 { 195 196 Object object = cache.get(new Integer(index)); 196 if(object == null) { 197 // Retrieve the required element 198 Element element = (Element) children.item(index); 199 // Now wrap it in the object of the users choice 200 object = class_type.create(element); 201 cache.put(new Integer(index), object); 202 } 197 if (object != null) { 198 return object; 199 } 200 201 // Retrieve the required element 202 Element element = (Element) children.item(index); 203 DebugStream.println("Element at index " + index + " not in cache: " + element); 204 205 // Now wrap it in the object of the users choice 206 object = class_type.create(element); 207 cache.put(new Integer(index), object); 203 208 return object; 204 209 }
Note:
See TracChangeset
for help on using the changeset viewer.