1 module java.util.AbstractList; 2 3 import java.lang.all; 4 import java.util.Collection; 5 import java.util.AbstractCollection; 6 import java.util.List; 7 import java.util.ListIterator; 8 import java.util.Iterator; 9 10 abstract class AbstractList : AbstractCollection, List { 11 this(){ 12 } 13 14 public void add(int index, Object element){ 15 throw new UnsupportedOperationException(); 16 } 17 public bool add(String o){ 18 return add(stringcast(o)); 19 } 20 override 21 public bool add(Object o){ 22 add(size(), o); 23 return true; 24 } 25 override 26 public bool addAll(Collection c){ 27 throw new UnsupportedOperationException(); 28 } 29 public bool addAll(int index, Collection c){ 30 throw new UnsupportedOperationException(); 31 } 32 override 33 public void clear(){ 34 throw new UnsupportedOperationException(); 35 } 36 override 37 public bool contains(Object o){ return super.contains(o); } 38 public bool contains(String str){ return contains(stringcast(str)); } 39 override 40 public bool containsAll(Collection c){ return super.containsAll(c); } 41 override 42 public abstract equals_t opEquals(Object o); 43 44 public abstract Object get(int index); 45 46 override 47 public abstract hash_t toHash(); 48 49 public int indexOf(Object o){ 50 auto it = listIterator(); 51 int idx = 0; 52 while(it.hasNext()){ 53 auto t = it.next(); 54 if( t is null ? o is null : t == o){ 55 return idx; 56 } 57 idx++; 58 } 59 return -1; 60 } 61 override 62 public bool isEmpty(){ 63 return super.isEmpty(); 64 } 65 override 66 public Iterator iterator(){ 67 implMissing( __FILE__, __LINE__ ); 68 return null; 69 } 70 public int lastIndexOf(Object o){ 71 implMissing( __FILE__, __LINE__ ); 72 return 0; 73 } 74 public ListIterator listIterator(){ 75 implMissing( __FILE__, __LINE__ ); 76 return null; 77 } 78 public ListIterator listIterator(int index){ 79 implMissing( __FILE__, __LINE__ ); 80 return null; 81 } 82 public Object remove(int index){ 83 throw new UnsupportedOperationException(); 84 } 85 protected void removeRange(int fromIndex, int toIndex){ 86 } 87 override 88 public bool remove(Object o){ return super.remove(o); } 89 override 90 public bool remove(String o){ return super.remove(o); } 91 override 92 public bool removeAll(Collection c){ return super.removeAll(c); } 93 override 94 public bool retainAll(Collection c){ return super.retainAll(c); } 95 public Object set(int index, Object element){ 96 throw new UnsupportedOperationException(); 97 } 98 public List subList(int fromIndex, int toIndex){ 99 implMissing( __FILE__, __LINE__ ); 100 return null; 101 } 102 override 103 public Object[] toArray(){ return super.toArray(); } 104 override 105 public Object[] toArray(Object[] a){ return super.toArray(a); } 106 override 107 public String[] toArray(String[] a){ return super.toArray(a); } 108 public int opApply (int delegate(ref Object value) dg){ 109 implMissing( __FILE__, __LINE__ ); 110 return 0; 111 } 112 113 override 114 public String toString(){ 115 return super.toString(); 116 } 117 } 118