132
|
1 /*
|
|
2 File: Bag.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.Bag;
|
|
16
|
|
17 private import tango.util.collection.model.BagView,
|
|
18 tango.util.collection.model.Iterator,
|
|
19 tango.util.collection.model.Dispenser;
|
|
20
|
|
21 /**
|
|
22 * Bags are collections supporting multiple occurrences of elements.
|
|
23 * author: Doug Lea
|
|
24 **/
|
|
25
|
|
26 public interface Bag(V) : BagView!(V), Dispenser!(V)
|
|
27 {
|
|
28 public alias add opCatAssign;
|
|
29
|
|
30 void add (V);
|
|
31
|
|
32 void addIf (V);
|
|
33
|
|
34 void add (Iterator!(V));
|
|
35 }
|
|
36
|
|
37
|