1 16 package com.ibatis.sqlmap.engine.mapping.result; 17 18 import java.util.Collection ; 19 import java.util.Iterator ; 20 import java.util.List ; 21 import java.util.ListIterator ; 22 23 26 public class XmlList implements List { 27 28 private List list; 29 30 35 public XmlList(List list) { 36 this.list = list; 37 } 38 39 public int size() { 40 return list.size(); 41 } 42 43 public boolean isEmpty() { 44 return list.isEmpty(); 45 } 46 47 public boolean contains(Object o) { 48 return list.contains(o); 49 } 50 51 public Iterator iterator() { 52 return list.iterator(); 53 } 54 55 public Object [] toArray() { 56 return list.toArray(); 57 } 58 59 public Object [] toArray(Object a[]) { 60 return list.toArray(a); 61 } 62 63 public boolean add(Object o) { 64 return list.add(o); 65 } 66 67 public boolean remove(Object o) { 68 return list.remove(o); 69 } 70 71 public boolean containsAll(Collection c) { 72 return list.containsAll(c); 73 } 74 75 public boolean addAll(Collection c) { 76 return list.addAll(c); 77 } 78 79 public boolean addAll(int index, Collection c) { 80 return list.addAll(index, c); 81 } 82 83 public boolean removeAll(Collection c) { 84 return list.removeAll(c); 85 } 86 87 public boolean retainAll(Collection c) { 88 return list.retainAll(c); 89 } 90 91 public void clear() { 92 list.clear(); 93 } 94 95 public Object get(int index) { 96 return list.get(index); 97 } 98 99 public Object set(int index, Object element) { 100 return list.set(index, element); 101 } 102 103 public void add(int index, Object element) { 104 list.add(index, element); 105 } 106 107 public Object remove(int index) { 108 return list.remove(index); 109 } 110 111 public int indexOf(Object o) { 112 return list.indexOf(o); 113 } 114 115 public int lastIndexOf(Object o) { 116 return list.lastIndexOf(o); 117 } 118 119 public ListIterator listIterator() { 120 return list.listIterator(); 121 } 122 123 public ListIterator listIterator(int index) { 124 return list.listIterator(index); 125 } 126 127 public List subList(int fromIndex, int toIndex) { 128 return list.subList(fromIndex, toIndex); 129 } 130 131 public String toString() { 132 StringBuffer buffer = new StringBuffer (); 133 for (int i = 0, n = list.size(); i < n; i++) { 134 buffer.append(list.get(i)); 135 buffer.append("\r\n"); 136 } 137 return buffer.toString(); 138 } 139 140 } 141 | Popular Tags |