comparison tango/tango/util/collection/model/SetView.d @ 132:1700239cab2e trunk

[svn r136] MAJOR UNSTABLE UPDATE!!! Initial commit after moving to Tango instead of Phobos. Lots of bugfixes... This build is not suitable for most things.
author lindquist
date Fri, 11 Jan 2008 17:57:40 +0100
parents
children
comparison
equal deleted inserted replaced
131:5825d48b27d1 132:1700239cab2e
1 /*
2 File: SetView.d
3
4 Originally written by Doug Lea and released into the public domain.
5 Thanks for the assistance and support of Sun Microsystems Labs, Agorics
6 Inc, Loral, and everyone contributing, testing, and using this code.
7
8 History:
9 Date Who What
10 24Sep95 dl@cs.oswego.edu Create from collections.d working file
11
12 */
13
14
15 module tango.util.collection.model.SetView;
16
17 private import tango.util.collection.model.View;
18
19 /**
20 * Sets provide an include operations for adding
21 * an element only if it is not already present.
22 * They also add a guarantee:
23 * With sets,
24 * you can be sure that the number of occurrences of any
25 * element is either zero or one.
26 *
27 *
28 author: Doug Lea
29 * @version 0.93
30 *
31 * <P> For an introduction to this package see <A HREF="index.html"> Overview </A>.
32 *
33 **/
34
35 public interface SetView(T) : View!(T)
36 {
37 version (VERBOSE)
38 {
39 /**
40 * Construct a new Collection that is a clone of self except
41 * that it has indicated element. This can be used
42 * to create a series of collections, each differing from the
43 * other only in that they contain additional elements.
44 *
45 * @param element the element to include in the new collection
46 * Returns: a new collection c, with the matches as this, except that
47 * c.has(element)
48 * Throws: IllegalElementException if !canInclude(element)
49 **/
50
51 public Set including (T element);
52 public alias including opCat;
53 } // version
54 }
55