KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > databinding > observable > list > IObservableList


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  * Brad Reynolds - bug 167204
11  *******************************************************************************/

12
13 package org.eclipse.core.databinding.observable.list;
14
15 import java.util.Collection JavaDoc;
16 import java.util.Iterator JavaDoc;
17 import java.util.List JavaDoc;
18 import java.util.ListIterator JavaDoc;
19
20 import org.eclipse.core.databinding.observable.IObservableCollection;
21
22 /**
23  * A list whose changes can be tracked by list change listeners.
24  *
25  * <p>
26  * This interface is not intended to be implemented by clients. Clients should
27  * instead subclass one of the framework classes that implement this interface.
28  * Note that direct implementers of this interface outside of the framework will
29  * be broken in future releases when methods are added to this interface.
30  * </p>
31  *
32  * @since 1.0
33  */

34 public interface IObservableList extends List JavaDoc, IObservableCollection {
35     
36     /**
37      * Adds the given list change listener to the list of list change listeners.
38      * @param listener
39      */

40     public void addListChangeListener(IListChangeListener listener);
41     
42     /**
43      * Removes the given list change listener from the list of list change listeners.
44      * Has no effect if the given listener is not registered as a list change listener.
45      *
46      * @param listener
47      */

48     public void removeListChangeListener(IListChangeListener listener);
49
50     /**
51      * @TrackedGetter
52      */

53     public int size();
54
55     /**
56      * @TrackedGetter
57      */

58     public boolean isEmpty();
59
60     /**
61      * @TrackedGetter
62      */

63     public boolean contains(Object JavaDoc o);
64
65     /**
66      * @TrackedGetter
67      */

68     public Iterator JavaDoc iterator();
69
70     /**
71      * @TrackedGetter
72      */

73     public Object JavaDoc[] toArray();
74
75     /**
76      * @TrackedGetter
77      */

78     public Object JavaDoc[] toArray(Object JavaDoc a[]);
79
80     /**
81      *
82      */

83     public boolean add(Object JavaDoc o);
84
85     /**
86      *
87      */

88     public boolean remove(Object JavaDoc o);
89
90     /**
91      * @TrackedGetter
92      */

93     public boolean containsAll(Collection JavaDoc c);
94
95     /**
96      *
97      */

98     public boolean addAll(Collection JavaDoc c);
99
100     /**
101      *
102      */

103     public boolean addAll(int index, Collection JavaDoc c);
104
105     /**
106      *
107      */

108     public boolean removeAll(Collection JavaDoc c);
109
110     /**
111      *
112      */

113     public boolean retainAll(Collection JavaDoc c);
114
115     /**
116      * @TrackedGetter
117      */

118     public boolean equals(Object JavaDoc o);
119
120     /**
121      * @TrackedGetter
122      */

123     public int hashCode();
124
125     /**
126      * @TrackedGetter
127      */

128     public Object JavaDoc get(int index);
129
130     /**
131      *
132      */

133     public Object JavaDoc set(int index, Object JavaDoc element);
134
135     /**
136      *
137      */

138     public Object JavaDoc remove(int index);
139
140     /**
141      * @TrackedGetter
142      */

143     public int indexOf(Object JavaDoc o);
144
145     /**
146      * @TrackedGetter
147      */

148     public int lastIndexOf(Object JavaDoc o);
149
150     /**
151      * @TrackedGetter
152      */

153     public ListIterator JavaDoc listIterator();
154
155     /**
156      * @TrackedGetter
157      */

158     public ListIterator JavaDoc listIterator(int index);
159
160     /**
161      * @TrackedGetter
162      */

163     public List JavaDoc subList(int fromIndex, int toIndex);
164
165     /**
166      * @return the type of the elements or <code>null</code> if untyped
167      */

168     Object JavaDoc getElementType();
169 }
170
Popular Tags