comparison org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/IObservableSet.d @ 78:0a55d2d5a946

Added file for databinding
author Frank Benoit <benoit@tionex.de>
date Tue, 14 Apr 2009 11:35:29 +0200
parents
children 383ce7bd736b
comparison
equal deleted inserted replaced
76:f05e6e8b2f2d 78:0a55d2d5a946
1 /*******************************************************************************
2 * Copyright (c) 2006, 2008 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 module org.eclipse.core.databinding.observable.set.IObservableSet;
13
14 import java.lang.all;
15
16 import java.util.Collection;
17 import java.util.Iterator;
18 import java.util.Set;
19
20 import org.eclipse.core.databinding.observable.IObservableCollection;
21
22 /**
23 * A set whose changes can be tracked by set change listeners.
24 *
25 * @noextend This interface is not intended to be extended by clients.
26 * @noimplement This interface is not intended to be implemented by clients.
27 * Clients should instead subclass one of the classes that
28 * implement this interface. Note that direct implementers of this
29 * interface outside of the framework will be broken in future
30 * releases when methods are added to this interface.
31 *
32 * @see AbstractObservableSet
33 * @see ObservableSet
34 *
35 * @since 1.0
36 *
37 */
38 public interface IObservableSet : Set, IObservableCollection {
39
40 /**
41 * @param listener
42 */
43 public void addSetChangeListener(ISetChangeListener listener);
44
45 /**
46 * @param listener
47 */
48 public void removeSetChangeListener(ISetChangeListener listener);
49
50 /**
51 * @return the element type or <code>null</code> if untyped
52 */
53 public Object getElementType();
54
55 /**
56 * @TrackedGetter
57 */
58 int size();
59
60 /**
61 * @TrackedGetter
62 */
63 bool isEmpty();
64
65 /**
66 * @TrackedGetter
67 */
68 bool contains(Object o);
69
70 /**
71 * @TrackedGetter
72 */
73 Iterator iterator();
74
75 /**
76 * @TrackedGetter
77 */
78 Object[] toArray();
79
80 /**
81 * @TrackedGetter
82 */
83 Object[] toArray(Object a[]);
84
85 // Modification Operations
86
87 /**
88 * @TrackedGetter
89 */
90 bool add(Object o);
91
92 /**
93 * @TrackedGetter
94 */
95 bool remove(Object o);
96
97 // Bulk Operations
98
99 /**
100 * @TrackedGetter
101 */
102 bool containsAll(Collection c);
103
104 /**
105 * @TrackedGetter
106 */
107 bool addAll(Collection c);
108
109 /**
110 * @TrackedGetter
111 */
112 bool retainAll(Collection c);
113
114 /**
115 * @TrackedGetter
116 */
117 bool removeAll(Collection c);
118
119 // Comparison and hashing
120
121 /**
122 * @TrackedGetter
123 */
124 bool opEquals(Object o);
125
126 /**
127 * @TrackedGetter
128 */
129 int hashCode();
130
131 }