3 * Copyright (C) 2007 Jürg Billeter
4 * Copyright (C) 2009 Didier Villevalois
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 * Julien Peeters <contact@julienpeeters.fr>
25 * Skeletal implementation of the {@link Set} interface.
27 * Contains common code shared by all set implementations.
32 public abstract class Gee.AbstractSet<G> : Gee.AbstractCollection<G>, Set<G> {
34 private weak Set<G> _read_only_view;
39 public virtual new Set<G> read_only_view {
41 Set<G> instance = _read_only_view;
42 if (_read_only_view == null) {
43 instance = new ReadOnlySet<G> (this);
44 _read_only_view = instance;
45 instance.add_weak_pointer ((void**) (&_read_only_view));
52 internal new virtual void reserved0() {}
53 internal new virtual void reserved1() {}
54 internal new virtual void reserved2() {}
55 internal new virtual void reserved3() {}
56 internal new virtual void reserved4() {}
57 internal new virtual void reserved5() {}
58 internal new virtual void reserved6() {}
59 internal new virtual void reserved7() {}
60 internal new virtual void reserved8() {}
61 internal new virtual void reserved9() {}