3 * Copyright (C) 2009 Ali Sabil
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 * Ali Sabil <ali.sabil@gmail.com>
24 * Hash table implementation of the {@link MultiSet} interface.
26 public class Gee.HashMultiSet<G> : AbstractMultiSet<G> {
27 public HashDataFunc<G> hash_func {
28 get { return ((HashMap<G, int>) _storage_map).key_hash_func; }
31 public EqualDataFunc<G> equal_func {
32 get { return ((HashMap<G, int>) _storage_map).key_equal_func; }
36 * Constructs a new, empty hash multi set.
38 * If not provided, the functions parameters are requested to the
39 * {@link Functions} function factory methods.
41 * @param hash_func an optional element hash function
42 * @param equal_func an optional element equality testing function
44 public HashMultiSet (HashDataFunc<G>? hash_func = null, EqualDataFunc<G>? equal_func = null) {
45 base (new HashMap<G, int> (hash_func, equal_func));