1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.collections15.set;
17
18 import java.util.Set;
19
20 import net.sf.collections15.collection.AbstractCollectionDecorator;
21
22
23 /***
24 * Decorates another <code>Set</code> to provide additional behaviour.
25 * <p>
26 * Methods are forwarded directly to the decorated set.
27 *
28 * @since Commons Collections 3.0
29 * @version $Revision: 1.1 $ $Date: 2005/05/03 22:45:38 $
30 *
31 * @author Stephen Colebourne
32 */
33 public abstract class AbstractSetDecorator<E>
34 extends AbstractCollectionDecorator<E>
35 implements Set<E>
36 {
37
38 /***
39 * Constructor only used in deserialization, do not use otherwise.
40 * @since Commons Collections 3.1
41 */
42 protected AbstractSetDecorator() {
43 super();
44 }
45
46 /***
47 * Constructor that wraps (not copies).
48 *
49 * @param set the set to decorate, must not be null
50 * @throws IllegalArgumentException if set is null
51 */
52 protected AbstractSetDecorator(Set<E> set) {
53 super(set);
54 }
55
56 /***
57 * Gets the set being decorated.
58 *
59 * @return the decorated set
60 */
61 protected Set<E> getSet() {
62 return (Set<E>) getCollection();
63 }
64
65 }