1 module java.util.AbstractSet; 2 3 import java.lang.all; 4 import java.util.Set; 5 import java.util.Collection; 6 import java.util.Iterator; 7 import java.util.AbstractCollection; 8 9 abstract class AbstractSet : AbstractCollection, Set { 10 this(){ 11 } 12 override 13 equals_t opEquals(Object o){ 14 implMissing( __FILE__, __LINE__ ); 15 return 0; 16 } 17 override 18 hash_t toHash(){ 19 implMissingSafe( __FILE__, __LINE__ ); 20 return 0; 21 } 22 override 23 public bool add(Object o){ return super.add(o); } 24 public bool add(String o){ return super.add(stringcast(o)); } 25 override 26 public bool addAll(Collection c){ return super.addAll(c); } 27 override 28 public void clear(){ super.clear(); } 29 override 30 public bool contains(Object o){ return super.contains(o); } 31 public bool contains(String o){ return super.contains(stringcast(o)); } 32 override 33 public bool containsAll(Collection c){ return super.containsAll(c); } 34 35 36 override 37 public bool isEmpty(){ return super.isEmpty(); } 38 //public Iterator iterator(){ return super.iterator(); } 39 override 40 public bool remove(Object o){ return super.remove(o); } 41 override 42 public bool remove(String o){ return super.remove(o); } 43 override 44 public bool removeAll(Collection c){ return super.removeAll(c); } 45 override 46 public bool retainAll(Collection c){ return super.retainAll(c); } 47 //public int size(){ return super.size(); } 48 override 49 public Object[] toArray(){ return super.toArray(); } 50 override 51 public Object[] toArray(Object[] a){ return super.toArray(a); } 52 override 53 public String toString(){ return super.toString(); } 54 55 // only for D 56 public int opApply (int delegate(ref Object value) dg){ 57 auto it = iterator(); 58 while( it.hasNext() ){ 59 auto v = it.next(); 60 int res = dg( v ); 61 if( res ) return res; 62 } 63 return 0; 64 } 65 } 66