This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 41166
Collapse All | Expand All

(-)src/org/openide/util/Enumerations.java (+286 lines)
Added Link Here
1
/*
2
 *                 Sun Public License Notice
3
 * 
4
 * The contents of this file are subject to the Sun Public License
5
 * Version 1.0 (the "License"). You may not use this file except in
6
 * compliance with the License. A copy of the License is available at
7
 * http://www.sun.com/
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
13
package org.openide.util;
14
15
import java.util.*;
16
import java.util.Enumeration;
17
import java.util.Map;
18
import java.util.Set;
19
20
/** Factory methods for various types of java.util.Enumeration
21
 *
22
 * @author Jaroslav Tulach
23
 */
24
public final class Enumerations extends Object {
25
    /** No instances */
26
    private Enumerations () {
27
    }
28
    
29
    public static Enumeration EMPTY = Collections.enumeration (Collections.EMPTY_LIST);
30
    
31
    public static Enumeration singleton (Object obj) {
32
        return Collections.enumeration (Collections.singleton (obj));
33
    }
34
    public static Enumeration concat (Enumeration en1, Enumeration en2) {
35
        return new SeqEn (en1, en2);
36
    }
37
    public static Enumeration concat (Enumeration enumOfEnums) {
38
        return new SeqEn (enumOfEnums);
39
    }
40
    public static Enumeration removeDuplicates (Enumeration en) {
41
        class HashSetWithInverseContains extends HashSet {
42
            public boolean contains (Object o) {
43
                // returns true if the object is not yet there
44
                return super.add (o);
45
            }
46
        }
47
        
48
        return filter (en, new HashSetWithInverseContains ());
49
    }
50
    
51
    public static Enumeration array (Object[] arr) {
52
        return Collections.enumeration (Arrays.asList (arr));
53
    }
54
    public static Enumeration convert (Enumeration en, Map map) {
55
        return new AltEn (en, map);
56
    }
57
    public static Enumeration removeNulls (Enumeration en) {
58
        return new FilEn (en);
59
    }
60
    public static Enumeration filter (Enumeration en, Set filter) {
61
        return new FilEn (en, filter);
62
    }
63
    public static Enumeration process (Enumeration en, Processor p) {
64
        return new ProEn (en, p);
65
    }
66
    
67
    /** Interface processor of enumerations.
68
     */
69
    public static interface Processor {
70
        /** @param obj original object
71
         * @param toAdd additional objects can be add or addAll to the end of current enumeration
72
         * @return object that should be returned from the enum instead of obj
73
         */
74
        public Object process (Object obj, List toAdd);
75
    }
76
    
77
    private static final class AltEn extends Object implements Enumeration {
78
        /** enumeration to filter */
79
        private Enumeration en;
80
        /** map to alter */
81
        private java.util.Map map;
82
83
        /**
84
        * @param en enumeration to filter
85
        */
86
        public AltEn (Enumeration en, java.util.Map map) {
87
            this.en = en;
88
            this.map = map;
89
        }
90
91
        /** @return true if there is more elements in the enumeration
92
        */
93
        public boolean hasMoreElements () {
94
            return en.hasMoreElements ();
95
        }
96
97
        /** @return next object in the enumeration
98
        * @exception NoSuchElementException can be thrown if there is no next object
99
        *   in the enumeration
100
        */
101
        public Object nextElement () {
102
            return map.get (en.nextElement ());
103
        }
104
    } // end of AltEn
105
106
    private static final class SeqEn extends Object implements Enumeration {
107
        /** enumeration of Enumerations */
108
        private Enumeration en;
109
        /** current enumeration */
110
        private Enumeration current;
111
112
        /** is {@link #current} up-to-date and has more elements?
113
        * The combination <CODE>current == null</CODE> and
114
        * <CODE>checked == true means there are no more elements
115
        * in this enumeration.
116
        */
117
        private boolean checked = false;
118
119
        /** Constructs new enumeration from already existing. The elements
120
        * of <CODE>en</CODE> should be also enumerations. The resulting
121
        * enumeration contains elements of such enumerations.
122
        *
123
        * @param en enumeration of Enumerations that should be sequenced
124
        */
125
        public SeqEn (Enumeration en) {
126
            this.en = en;
127
        }
128
129
        /** Composes two enumerations into one.
130
        * @param first first enumeration
131
        * @param second second enumeration
132
        */
133
        public SeqEn (Enumeration first, Enumeration second) {
134
            this (array (new Enumeration[] { first, second }));
135
        }
136
137
        /** Ensures that current enumeration is set. If there aren't more
138
        * elements in the Enumerations, sets the field <CODE>current</CODE> to null.
139
        */
140
        private void ensureCurrent () {
141
            while (current == null || !current.hasMoreElements ()) {
142
                if (en.hasMoreElements ()) {
143
                    current = (Enumeration)en.nextElement ();
144
                } else {
145
                    // no next valid enumeration
146
                    current = null;
147
                    return;
148
                }
149
            }
150
        }
151
152
        /** @return true if we have more elements */
153
        public boolean hasMoreElements () {
154
            if( !checked ) {
155
                ensureCurrent ();
156
                checked = true;
157
            }
158
            return current != null;
159
        }
160
161
        /** @return next element
162
        * @exception NoSuchElementException if there is no next element
163
        */
164
        public synchronized Object nextElement () {
165
            if( !checked ) {
166
                ensureCurrent ();
167
            }
168
            if( current != null ) {
169
                checked = false;
170
                return current.nextElement ();
171
            } else {
172
                checked = true;
173
                throw new java.util.NoSuchElementException ();
174
            }
175
        }
176
    } // end of SeqEn
177
178
    private static final class FilEn extends Object implements Enumeration {
179
        /** marker object stating there is no nexte element prepared */
180
        private static final Object EMPTY = new Object();
181
182
        /** enumeration to filter */
183
        private Enumeration en;
184
185
        /** element to be returned next time or {@link #EMPTY} if there is
186
        * no such element prepared */
187
        private Object next = EMPTY;
188
        
189
        /** the set to use as filter */
190
        private java.util.Set filter;
191
192
        /** Remove nulls.
193
        * @param en enumeration to filter
194
        */
195
        public FilEn (Enumeration en) {
196
            this.en = en;
197
        }
198
        
199
        /**
200
        * @param en enumeration to filter
201
        */
202
        public FilEn (Enumeration en, java.util.Set filter) {
203
            if (filter == null) throw new NullPointerException ();
204
            this.en = en;
205
            this.filter = filter;
206
        }
207
208
        /** @return true if there is more elements in the enumeration
209
        */
210
        public boolean hasMoreElements () {
211
            if (next != EMPTY) {
212
                // there is a object already prepared
213
                return true;
214
            }
215
            while (en.hasMoreElements ()) {
216
                // read next
217
                next = en.nextElement ();
218
                if (filter != null) {
219
                    if (filter.contains (next)) {
220
                        // if the object is accepted
221
                        return true;
222
                    }
223
                } else {
224
                    // filter out nulls
225
                    if (next != null) {
226
                        return true;
227
                    }
228
                }
229
            }
230
            next = EMPTY;
231
            return false;
232
        }
233
234
        /** @return next object in the enumeration
235
        * @exception NoSuchElementException can be thrown if there is no next object
236
        *   in the enumeration
237
        */
238
        public Object nextElement () {
239
            if( next == EMPTY && !hasMoreElements() ) {
240
                throw new NoSuchElementException ();
241
            }
242
            Object res = next;
243
            next = EMPTY;
244
            return res;
245
        }
246
    } // end of FilEn
247
248
    /** Processor enumeration.
249
     */
250
    private static final class ProEn extends java.util.LinkedList 
251
    implements java.util.Enumeration {
252
        private Processor processor;
253
        private Enumeration delegate;
254
        
255
        public ProEn (Enumeration en, Processor p) {
256
            this.processor = p;
257
            this.delegate = en;
258
        }
259
        
260
        public boolean hasMoreElements () {
261
            if (delegate != null && delegate.hasMoreElements ()) {
262
                return true;
263
            }
264
            return !isEmpty ();
265
        }
266
        
267
        public Object nextElement () {
268
            Object ret;
269
            if (delegate != null) {
270
                ret = delegate.nextElement ();
271
                if (!delegate.hasMoreElements ()) {
272
                    delegate = null;
273
                }
274
            } else {
275
276
                if (isEmpty ()) {
277
                    throw new NoSuchElementException ();
278
                }
279
                ret = this.removeFirst ();
280
            }
281
            ret = processor.process (ret, this);
282
            return ret;
283
        }
284
        
285
    } // end of ProEn
286
}
(-)test/unit/src/org/openide/util/EnumerationsTest.java (+394 lines)
Added Link Here
1
/*
2
 *                 Sun Public License Notice
3
 * 
4
 * The contents of this file are subject to the Sun Public License
5
 * Version 1.0 (the "License"). You may not use this file except in
6
 * compliance with the License. A copy of the License is available at
7
 * http://www.sun.com/
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
13
package org.openide.util;
14
15
import java.util.*;
16
import java.util.Enumeration;
17
import java.util.Map;
18
import java.util.Set;
19
20
/** This is the base test for new and old enumerations. It contains 
21
 * factory methods for various kinds of enumerations and set of tests
22
 * that use them. Factory methods are overriden in OldEnumerationsTest
23
 *
24
 * @author Jaroslav Tulach
25
 */
26
public class EnumerationsTest extends org.netbeans.junit.NbTestCase {
27
    
28
    /** Creates a new instance of EnumerationsTest */
29
    public EnumerationsTest (String testName) {
30
        super(testName);
31
    }
32
33
    public static void main(java.lang.String[] args) {
34
        junit.textui.TestRunner.run(new org.netbeans.junit.NbTestSuite(EnumerationsTest.class));
35
    }
36
37
    //
38
    // Factory methods
39
    //
40
    
41
    protected Enumeration singleton (Object obj) {
42
        return Enumerations.singleton (obj);
43
    }
44
    protected Enumeration concat (Enumeration en1, Enumeration en2) {
45
        return Enumerations.concat (en1, en2);
46
    }
47
    protected Enumeration concat (Enumeration enumOfEnums) {
48
        return Enumerations.concat (enumOfEnums);
49
    }
50
    protected Enumeration removeDuplicates (Enumeration en) {
51
        return Enumerations.removeDuplicates (en);
52
    }
53
    protected Enumeration empty () {
54
        return Enumerations.EMPTY;
55
    }
56
    protected Enumeration array (Object[] arr) {
57
        return Enumerations.array (arr);
58
    }
59
    protected Enumeration convert (Enumeration en, Map map) {
60
        return Enumerations.convert (en, map);
61
    }
62
    protected Enumeration removeNulls (Enumeration en) {
63
        return Enumerations.removeNulls (en);
64
    }
65
    protected Enumeration filter (Enumeration en, Set filter) {
66
        return Enumerations.filter (en, filter);
67
    }
68
    protected Enumeration queue (List initial, final QueueProcessor processor) {
69
        return Enumerations.process (
70
            java.util.Collections.enumeration (initial), new Enumerations.Processor() {
71
                public Object process (Object obj, List toAdd) {
72
                    return processor.process (obj, toAdd);
73
                }
74
            }
75
        );
76
    }
77
    
78
    public static interface QueueProcessor {
79
        /** @param obj Object object on output
80
         * @param addItemsHere allows to add or addAll aditional items to the end of current enum
81
         * @return object to be returned 
82
         */
83
        public Object process (Object obj, List addItemsHere);
84
    }
85
86
    //
87
    // The tests
88
    // 
89
    
90
    public void testEmptyIsEmpty () {
91
        Enumeration e = empty ();
92
        assertFalse (e.hasMoreElements ());
93
        try {
94
            e.nextElement ();
95
            fail ("No elements");
96
        } catch (java.util.NoSuchElementException ex) {
97
            // ok
98
        }
99
    }
100
    
101
    public void testSingleIsSingle () {
102
        Enumeration e = singleton (this);
103
        assertTrue (e.hasMoreElements ());
104
        assertEquals ("Returns me", this, e.nextElement ());
105
        assertFalse ("Now it is empty", e.hasMoreElements ());
106
        try {
107
            e.nextElement ();
108
            fail ("No elements");
109
        } catch (java.util.NoSuchElementException ex) {
110
            // ok
111
        }
112
    }
113
114
    public void testConcatTwoAndArray () {
115
        Object[] one = { new Integer (1), new Integer (2), new Integer (3) };
116
        Object[] two = { "1", "2", "3" };
117
        
118
        ArrayList list = new ArrayList (Arrays.asList (one));
119
        list.addAll (Arrays.asList (two));
120
        
121
        assertEnums (
122
            concat (array (one), array (two)),
123
            Collections.enumeration (list)
124
        );
125
    }
126
    
127
    public void testConcatTwoAndArrayAndTakeOnlyStrings () {
128
        Object[] one = { new Integer (1), new Integer (2), new Integer (3) };
129
        Object[] two = { "1", "2", "3" };
130
        Object[] three = { new Long (1) };
131
        Object[] four = { "Kuk" };
132
        
133
        ArrayList list = new ArrayList (Arrays.asList (two));
134
        list.addAll (Arrays.asList (four));
135
        
136
        Enumeration[] alls = {
137
            array (one), array (two), array (three), array (four)
138
        };
139
        
140
        assertEnums (
141
            filter (concat (array (alls)), new OnlyStrings()),
142
            Collections.enumeration (list)
143
        );
144
    }
145
    
146
    public void testRemoveDuplicates () {
147
        Object[] one = { new Integer (1), new Integer (2), new Integer (3) };
148
        Object[] two = { "1", "2", "3" };
149
        Object[] three = { new Integer (1) };
150
        Object[] four = { "2", "3", "4" };
151
        
152
        Enumeration[] alls = {
153
            array (one), array (two), array (three), array (four)
154
        };
155
        
156
        assertEnums (
157
            removeDuplicates (concat (array (alls))),
158
            array (new Object[] { new Integer (1), new Integer (2), new Integer (3), "1", "2", "3", "4" })
159
        );
160
        
161
    }
162
    
163
    
164
    public void testConvertIntegersToStringRemoveNulls () {
165
        Object[] garbage = { new Integer (1), "kuk", "hle", new Integer (5) };
166
        
167
        assertEnums (
168
            convert (array (garbage), new MapIntegers ()),
169
            array (new Object[] { "1", null, null, "5" })
170
        );
171
        
172
        assertEnums (
173
            removeNulls (convert (array (garbage), new MapIntegers ())), 
174
            array (new Object[] { "1", "5" })
175
        );
176
    }
177
    
178
    public void testQueueEnum () {
179
        Object obj = new Integer (5);
180
        class AddOneTill10 implements QueueProcessor {
181
            public Object process (Object obj, List toAddTo) {
182
                Integer i = (Integer)obj;
183
                if (i.intValue () < 10) {
184
                    toAddTo.add (new Integer (i.intValue () + 1));
185
                }
186
                return i;
187
            }
188
        }
189
        Enumeration en = queue (Collections.nCopies (1, obj), new AddOneTill10 ());
190
        
191
        assertEnums (en, array (new Object[] {
192
            new Integer (5), new Integer (6), new Integer (7), new Integer (8), new Integer (9), new Integer (10)
193
        }));
194
        
195
    }
196
197
    public void testQueueEnumDoesWideSearchFirst () {
198
        Object[] obj = {
199
            new Integer (1),       
200
            new Object[] { 
201
                new Integer (4),
202
                new Object[] {
203
                    new Integer (7),
204
                    new Integer (8),
205
                },
206
                new Integer (5),
207
            },
208
            new Integer (2),
209
            new Object[] { new Integer (6) },
210
            new Integer (3),
211
        };
212
        class AddArray implements QueueProcessor {
213
            public Object process (Object obj, List toAddTo) {
214
                if (obj instanceof Object[]) {
215
                    toAddTo.addAll (Arrays.asList ((Object[])obj));
216
                    return null;
217
                } else {
218
                    return obj;
219
                }
220
            }
221
        }
222
        
223
        
224
        Enumeration en = removeNulls (
225
            queue (Collections.nCopies (1, obj), new AddArray ())
226
        );
227
228
        for (int i = 1; i < 9; i++) {
229
            Integer number = (Integer)en.nextElement ();
230
            assertEquals (i, number.intValue ());
231
        }
232
        
233
    }
234
    
235
    private static void assertEnums (Enumeration e1, Enumeration e2) {
236
        int indx = 0;
237
        while (e1.hasMoreElements () && e2.hasMoreElements ()) {
238
            assertEquals (indx++ + "th: ", e1.nextElement (), e2.nextElement ());
239
        }
240
        
241
        if (e1.hasMoreElements ()) {
242
            fail ("first one contains another element: " + e1.nextElement ());
243
        }
244
        if (e2.hasMoreElements ()) {
245
            fail ("second one contains another element: " + e2.nextElement ());
246
        }
247
        
248
        try {
249
            e1.nextElement ();
250
            fail ("First one should throw exception, but nothing happend");
251
        } catch (java.util.NoSuchElementException ex) {
252
            // ok
253
        }
254
        
255
        try {
256
            e2.nextElement ();
257
            fail ("Second one should throw exception, but nothing happend");
258
        } catch (java.util.NoSuchElementException ex) {
259
            // ok
260
        }
261
    }
262
    
263
    /** Filters only strings.
264
     */
265
    private static final class OnlyStrings implements java.util.Set {
266
        public boolean add (Object o) {
267
            fail ("Should not be every called");
268
            return false;
269
        }
270
        
271
        public boolean addAll (Collection c) {
272
            fail ("Should not be every called");
273
            return false;
274
        }
275
        
276
        public void clear () {
277
            fail ("Should not be every called");
278
        }
279
        
280
        public boolean contains (Object o) {
281
            return o instanceof String;
282
        }
283
        
284
        public boolean containsAll (Collection c) {
285
            fail ("Should not be every called");
286
            return false;
287
        }
288
        
289
        public boolean isEmpty () {
290
            fail ("Should not be every called");
291
            return false;
292
        }
293
        
294
        public Iterator iterator () {
295
            fail ("Should not be every called");
296
            return null;
297
        }
298
        
299
        public boolean remove (Object o) {
300
            fail ("Should not be every called");
301
            return false;
302
        }
303
        
304
        public boolean removeAll (Collection c) {
305
            fail ("Should not be every called");
306
            return false;
307
        }
308
        
309
        public boolean retainAll (Collection c) {
310
            fail ("Should not be every called");
311
            return false;
312
        }
313
        
314
        public int size () {
315
            fail ("Should not be every called");
316
            return 1;
317
        }
318
        
319
        public Object[] toArray () {
320
            fail ("Should not be every called");
321
            return null;
322
        }
323
        
324
        public Object[] toArray (Object[] a) {
325
            fail ("Should not be every called");
326
            return null;
327
        }
328
    }
329
    
330
    /** Filters only strings.
331
     */
332
    private static final class MapIntegers implements java.util.Map {
333
        public boolean containsKey (Object key) {
334
            fail ("Should not be every called");
335
            return false;
336
        }
337
        
338
        public boolean containsValue (Object value) {
339
            fail ("Should not be every called");
340
            return false;
341
        }
342
        
343
        public Set entrySet () {
344
            fail ("Should not be every called");
345
            return null;
346
        }
347
        
348
        public Object get (Object key) {
349
            if (key instanceof Integer) {
350
                return key.toString ();
351
            }
352
            return null;
353
        }
354
        
355
        public Set keySet () {
356
            fail ("Should not be every called");
357
            return null;
358
        }
359
        
360
        public Object put (Object key, Object value) {
361
            fail ("Should not be every called");
362
            return null;
363
        }
364
        
365
        public void putAll (Map t) {
366
            fail ("Should not be every called");
367
        }
368
        
369
        public Collection values () {
370
            fail ("Should not be every called");
371
            return null;
372
        }
373
        
374
        public void clear () {
375
            fail ("Should not be every called");
376
        }
377
        
378
        public boolean isEmpty () {
379
            fail ("Should not be every called");
380
            return false;
381
        }
382
        
383
        public Object remove (Object key) {
384
            fail ("Should not be every called");
385
            return null;
386
        }
387
        
388
        public int size () {
389
            fail ("Should not be every called");
390
            return 1;
391
        }
392
        
393
    }
394
}
(-)test/unit/src/org/openide/util/OldEnumerationsTest.java (+202 lines)
Added Link Here
1
/*
2
 *                 Sun Public License Notice
3
 * 
4
 * The contents of this file are subject to the Sun Public License
5
 * Version 1.0 (the "License"). You may not use this file except in
6
 * compliance with the License. A copy of the License is available at
7
 * http://www.sun.com/
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
13
package org.openide.util;
14
15
import org.openide.util.enum.*;
16
17
/** Implement factory methods from EnumerationsTest, shares the same tests
18
 * with EnumerationsTest.
19
 *
20
 * @author Jaroslav Tulach
21
 */
22
public class OldEnumerationsTest extends EnumerationsTest {
23
    
24
    /** Creates a new instance of EnumerationsTest */
25
    public OldEnumerationsTest (String testName) {
26
        super(testName);
27
    }
28
29
    public static void main(java.lang.String[] args) {
30
        junit.textui.TestRunner.run(new org.netbeans.junit.NbTestSuite(OldEnumerationsTest.class));
31
    }
32
33
    protected java.util.Enumeration singleton (Object obj) {
34
        return new SingletonEnumeration (obj);
35
    }    
36
    
37
    protected java.util.Enumeration convert (java.util.Enumeration en, final java.util.Map map) {
38
        return new AlterEnumeration (en) {
39
            protected Object alter (Object o) {
40
                return map.get (o);
41
            }
42
        };
43
    }    
44
45
    protected java.util.Enumeration removeDuplicates (java.util.Enumeration en) {
46
        return new RemoveDuplicatesEnumeration (en);
47
    }
48
    
49
    protected java.util.Enumeration removeNulls (java.util.Enumeration en) {
50
        return new FilterEnumeration (en);
51
    }
52
    
53
    protected java.util.Enumeration concat (java.util.Enumeration en1, java.util.Enumeration en2) {
54
        return new SequenceEnumeration (en1, en2);
55
    }
56
    
57
    protected java.util.Enumeration array (Object[] arr) {
58
        return new ArrayEnumeration (arr);
59
    }
60
    
61
    protected java.util.Enumeration filter (java.util.Enumeration en, final java.util.Set filter) {
62
        return new FilterEnumeration (en) {
63
            protected boolean accept (Object obj) {
64
                return filter.contains (obj);
65
            }
66
        };
67
    }
68
    
69
    protected java.util.Enumeration concat (java.util.Enumeration enumOfEnums) {
70
        return new SequenceEnumeration (enumOfEnums);
71
    }
72
    
73
    protected java.util.Enumeration empty () {
74
        return new EmptyEnumeration ();
75
    }
76
    
77
    protected java.util.Enumeration queue (java.util.List initial, QueueProcessor processor) {
78
        QE en = new QE (processor);
79
        en.put (initial.toArray ());
80
        return en;
81
    }
82
    
83
    class QE extends QueueEnumeration implements java.util.List {
84
        private QueueProcessor processor;
85
        private Object orig;
86
        private Object replace;
87
        
88
        public QE (QueueProcessor p) {
89
            this.processor = p;
90
        }
91
        
92
        public Object nextElement () {
93
            Object ret = super.nextElement ();
94
            if (ret == orig) {
95
                return replace;
96
            } else {
97
                return ret;
98
            }
99
        }
100
        
101
        
102
        protected void process (Object obj) {
103
            orig = obj;
104
            replace = processor.process (obj, this);
105
        }
106
107
        public boolean add (Object o) {
108
            put (o);
109
            return true;
110
        }
111
112
        public void add (int index, Object element) {
113
            throw new UnsupportedOperationException ();
114
        }
115
116
        public boolean addAll (java.util.Collection c) {
117
            put (c.toArray ());
118
            return !c.isEmpty ();
119
        }
120
121
        public boolean addAll (int index, java.util.Collection c) {
122
            throw new UnsupportedOperationException ();
123
        }
124
125
        public void clear () {
126
            throw new UnsupportedOperationException ();
127
        }
128
129
        public boolean contains (Object o) {
130
            throw new UnsupportedOperationException ();
131
        }
132
133
        public boolean containsAll (java.util.Collection c) {
134
            throw new UnsupportedOperationException ();
135
        }
136
137
        public Object get (int index) {
138
            throw new UnsupportedOperationException ();
139
        }
140
141
        public int indexOf (Object o) {
142
            throw new UnsupportedOperationException ();
143
        }
144
145
        public boolean isEmpty () {
146
            throw new UnsupportedOperationException ();
147
        }
148
149
        public java.util.Iterator iterator () {
150
            throw new UnsupportedOperationException ();
151
        }
152
153
        public int lastIndexOf (Object o) {
154
            throw new UnsupportedOperationException ();
155
        }
156
157
        public java.util.ListIterator listIterator () {
158
            throw new UnsupportedOperationException ();
159
        }
160
161
        public java.util.ListIterator listIterator (int index) {
162
            throw new UnsupportedOperationException ();
163
        }
164
165
        public boolean remove (Object o) {
166
            throw new UnsupportedOperationException ();
167
        }
168
169
        public Object remove (int index) {
170
            throw new UnsupportedOperationException ();
171
        }
172
173
        public boolean removeAll (java.util.Collection c) {
174
            throw new UnsupportedOperationException ();
175
        }
176
177
        public boolean retainAll (java.util.Collection c) {
178
            throw new UnsupportedOperationException ();
179
        }
180
181
        public Object set (int index, Object element) {
182
            throw new UnsupportedOperationException ();
183
        }
184
185
        public int size () {
186
            throw new UnsupportedOperationException ();
187
        }
188
189
        public java.util.List subList (int fromIndex, int toIndex) {
190
            throw new UnsupportedOperationException ();
191
        }
192
193
        public Object[] toArray () {
194
            throw new UnsupportedOperationException ();
195
        }
196
197
        public Object[] toArray (Object[] a) {
198
            throw new UnsupportedOperationException ();
199
        }
200
    } // end of QE
201
    
202
}

Return to bug 41166