1 module java.util.Collection; 2 3 import java.lang.all; 4 import java.util.Iterator; 5 6 interface Collection { 7 public bool add(Object o); 8 public bool add(String o); 9 public bool addAll(Collection c); 10 public void clear(); 11 public bool contains(Object o); 12 public bool containsAll(Collection c); 13 public equals_t opEquals(Object o); 14 public hash_t toHash(); 15 public bool isEmpty(); 16 public Iterator iterator(); 17 public bool remove(Object o); 18 public bool remove(String o); 19 public bool removeAll(Collection c); 20 public bool retainAll(Collection c); 21 public int size(); 22 public Object[] toArray(); 23 public Object[] toArray(Object[] a); 24 25 // only for D 26 public int opApply (int delegate(ref Object value) dg); 27 } 28