1 17 package org.apache.commons.collections.primitives.decorators; 18 19 import org.apache.commons.collections.primitives.IntCollection; 20 import org.apache.commons.collections.primitives.IntIterator; 21 22 29 abstract class BaseProxyIntCollection implements IntCollection { 30 protected abstract IntCollection getProxiedCollection(); 31 32 protected BaseProxyIntCollection() { 33 } 34 35 36 37 public boolean add(int element) { 38 return getProxiedCollection().add(element); 39 } 40 41 public boolean addAll(IntCollection c) { 42 return getProxiedCollection().addAll(c); 43 } 44 45 public void clear() { 46 getProxiedCollection().clear(); 47 } 48 49 public boolean contains(int element) { 50 return getProxiedCollection().contains(element); 51 } 52 53 public boolean containsAll(IntCollection c) { 54 return getProxiedCollection().containsAll(c); 55 } 56 57 public boolean isEmpty() { 58 return getProxiedCollection().isEmpty(); 59 } 60 61 public IntIterator iterator() { 62 return getProxiedCollection().iterator(); 63 } 64 65 public boolean removeAll(IntCollection c) { 66 return getProxiedCollection().removeAll(c); 67 } 68 69 public boolean removeElement(int element) { 70 return getProxiedCollection().removeElement(element); 71 } 72 73 public boolean retainAll(IntCollection c) { 74 return getProxiedCollection().retainAll(c); 75 } 76 77 public int size() { 78 return getProxiedCollection().size(); 79 } 80 81 public int[] toArray() { 82 return getProxiedCollection().toArray(); 83 } 84 85 public int[] toArray(int[] a) { 86 return getProxiedCollection().toArray(a); 87 } 88 89 91 public boolean equals(Object obj) { 92 return getProxiedCollection().equals(obj); 93 } 94 95 public int hashCode() { 96 return getProxiedCollection().hashCode(); 97 } 98 99 public String toString() { 100 return getProxiedCollection().toString(); 101 } 102 103 } 104 | Popular Tags |