KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > databinding > observable > set > IObservableSet


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  *******************************************************************************/

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

33 public interface IObservableSet extends Set JavaDoc, IObservableCollection {
34
35     /**
36      * @param listener
37      */

38     public void addSetChangeListener(ISetChangeListener listener);
39
40     /**
41      * @param listener
42      */

43     public void removeSetChangeListener(ISetChangeListener listener);
44
45     /**
46      * @return the element type or <code>null</code> if untyped
47      */

48     public Object JavaDoc getElementType();
49
50     /**
51      * @TrackedGetter
52      */

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

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

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

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

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

78     Object JavaDoc[] toArray(Object JavaDoc a[]);
79
80     // Modification Operations
81

82     /**
83      * @TrackedGetter
84      */

85     boolean add(Object JavaDoc o);
86
87     /**
88      * @TrackedGetter
89      */

90     boolean remove(Object JavaDoc o);
91
92     // Bulk Operations
93

94     /**
95      * @TrackedGetter
96      */

97     boolean containsAll(Collection JavaDoc c);
98
99     /**
100      * @TrackedGetter
101      */

102     boolean addAll(Collection JavaDoc c);
103
104     /**
105      * @TrackedGetter
106      */

107     boolean retainAll(Collection JavaDoc c);
108
109     /**
110      * @TrackedGetter
111      */

112     boolean removeAll(Collection JavaDoc c);
113
114     // Comparison and hashing
115

116     /**
117      * @TrackedGetter
118      */

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

124     int hashCode();
125
126 }
127
Popular Tags