1 module java.util.List;
2
3 import java.lang.all;
4 import java.util.Collection;
5 import java.util.Iterator;
6 import java.util.ListIterator;
7
8 interface List : Collection {
9 public void add(int index, Object element);
10 public bool add(Object o);
11 public bool add(String o);
12 public bool addAll(Collection c);
13 public bool addAll(int index, Collection c);
14 public void clear();
15 public bool contains(Object o);
16 public bool contains(String o);
17 public bool containsAll(Collection c);
18 public equals_t opEquals(Object o);
19 public Object get(int index);
20 version(Tango){
21 public hash_t toHash();
22 } else { // Phobos
23 mixin(`@safe nothrow public hash_t toHash();`);
24 }
25 public int indexOf(Object o);
26 public bool isEmpty();
27 public Iterator iterator();
28 public int lastIndexOf(Object o);
29 public ListIterator listIterator();
30 public ListIterator listIterator(int index);
31 public Object remove(int index);
32 public bool remove(Object o);
33 public bool remove(String o);
34 public bool removeAll(Collection c);
35 public bool retainAll(Collection c);
36 public Object set(int index, Object element);
37 public int size();
38 public List subList(int fromIndex, int toIndex);
39 public Object[] toArray();
40 public Object[] toArray(Object[] a);
41 public String[] toArray(String[] a);
42 public String toString();
43 }
44