01: /*
02: * Copyright 2007 Google Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package java.util;
17:
18: /**
19: * Represents a sequence of objects. <a
20: * href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html">[Sun docs]</a>
21: *
22: * @param <E> element type
23: */
24: public interface List<E> extends Collection<E> {
25:
26: boolean add(E o);
27:
28: void add(int index, E element);
29:
30: boolean addAll(Collection<? extends E> c);
31:
32: boolean addAll(int index, Collection<? extends E> c);
33:
34: void clear();
35:
36: boolean contains(Object o);
37:
38: boolean containsAll(Collection<?> c);
39:
40: boolean equals(Object o);
41:
42: E get(int index);
43:
44: int hashCode();
45:
46: int indexOf(Object o);
47:
48: boolean isEmpty();
49:
50: Iterator<E> iterator();
51:
52: int lastIndexOf(Object o);
53:
54: ListIterator<E> listIterator();
55:
56: ListIterator<E> listIterator(int from);
57:
58: E remove(int index);
59:
60: boolean remove(Object o);
61:
62: boolean removeAll(Collection<?> c);
63:
64: boolean retainAll(Collection<?> c);
65:
66: E set(int index, E element);
67:
68: int size();
69:
70: List<E> subList(int fromIndex, int toIndex);
71:
72: Object[] toArray();
73:
74: <T> T[] toArray(T[] array);
75:
76: }
|