comparison tango/tango/util/collection/model/SortedKeys.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: SortedKeys.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.SortedKeys;
16
17 private import tango.util.collection.model.View,
18 tango.util.collection.model.Comparator;
19
20
21 /**
22 *
23 *
24 * KeySorted is a mixin interface for Collections that
25 * are always in sorted order with respect to a Comparator
26 * held by the Collection.
27 * <P>
28 * KeySorted Collections guarantee that enumerations
29 * appear in sorted order; that is if a and b are two Keys
30 * obtained in succession from keys().nextElement(), that
31 * <PRE>
32 * comparator().compare(a, b) <= 0.
33 * </PRE>
34 *
35 author: Doug Lea
36 * @version 0.93
37 *
38 * <P> For an introduction to this package see <A HREF="index.html"> Overview </A>.
39 **/
40
41 public interface SortedKeys(K, V) : View!(V)
42 {
43
44 /**
45 * Report the Comparator used for ordering
46 **/
47
48 public Comparator!(K) comparator();
49 }