3 * Copyright (C) 2009-2011 Maciej Piechotka
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * Maciej Piechotka <uzytkownik2@gmail.com>
23 public interface Gee.SortedMap<K,V> : Gee.Map<K,V> {
25 * Returns map containing pairs with key strictly lower the the argument.
27 public abstract SortedMap<K,V> head_map (K before);
30 * Returns map containing pairs with key equal or larger then the argument.
32 public abstract SortedMap<K,V> tail_map (K after);
35 * Returns right-open map (i.e. containing all pair which key is strictly
36 * lower then the second argument and equal or bigger then the first one).
38 * Null as one parameter means that it should include all from this side.
40 public abstract SortedMap<K,V> sub_map (K before, K after);
43 * Returns the keys in ascending order.
45 public abstract SortedSet<K> ascending_keys { owned get; }
48 * Returns the entries in ascending order.
50 public abstract SortedSet<Map.Entry<K,V>> ascending_entries { owned get; }
53 * The read-only view this map.
55 public new abstract SortedMap<K,V> read_only_view { owned get; }
58 * Returns an immutable empty map.
60 * @return an immutable empty map
62 public static Map<K,V> empty<K,V> () {
63 return new TreeMap<K,V> ().read_only_view;