KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > collections > set > AbstractSetDecorator


1 /*
2  * Copyright 2003-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.commons.collections.set;
17
18 import java.util.Set JavaDoc;
19
20 import org.apache.commons.collections.collection.AbstractCollectionDecorator;
21
22 /**
23  * Decorates another <code>Set</code> to provide additional behaviour.
24  * <p>
25  * Methods are forwarded directly to the decorated set.
26  *
27  * @since Commons Collections 3.0
28  * @version $Revision: 1.4 $ $Date: 2004/06/02 21:53:03 $
29  *
30  * @author Stephen Colebourne
31  */

32 public abstract class AbstractSetDecorator extends AbstractCollectionDecorator implements Set JavaDoc {
33
34     /**
35      * Constructor only used in deserialization, do not use otherwise.
36      * @since Commons Collections 3.1
37      */

38     protected AbstractSetDecorator() {
39         super();
40     }
41
42     /**
43      * Constructor that wraps (not copies).
44      *
45      * @param set the set to decorate, must not be null
46      * @throws IllegalArgumentException if set is null
47      */

48     protected AbstractSetDecorator(Set JavaDoc set) {
49         super(set);
50     }
51
52     /**
53      * Gets the set being decorated.
54      *
55      * @return the decorated set
56      */

57     protected Set JavaDoc getSet() {
58         return (Set JavaDoc) getCollection();
59     }
60
61 }
62
Popular Tags