3 * Copyright (C) 2009 Didier Villevalois
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 * Didier 'Ptitjes Villevalois <ptitjes@free.fr>
24 * Left-leaning red-black tree implementation of the {@link MultiSet}
27 public class Gee.TreeMultiSet<G> : AbstractMultiSet<G> {
28 public CompareDataFunc<G> compare_func {
29 get { return ((TreeMap<G, int>) _storage_map).key_compare_func; }
33 * Constructs a new, empty tree multi set.
35 * If not provided, the function parameter is requested to the
36 * {@link Functions} function factory methods.
38 * @param compare_func an optional element comparator function
40 public TreeMultiSet (owned CompareDataFunc<G>? compare_func = null) {
41 base (new TreeMap<G, int> (compare_func));