changes: TINF-175 TZPC-4722
[platform/upstream/libgee.git] / gee / abstractqueue.vala
1 /* abstractqueue.vala
2  *
3  * Copyright (C) 2009  Didier Villevalois
4  *
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.
9
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.
14
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
18  *
19  * Author:
20  *      Didier 'Ptitjes Villevalois <ptitjes@free.fr>
21  */
22
23 /**
24  * Skeletal implementation of the {@link Queue} interface.
25  *
26  * Contains common code shared by all queue implementations.
27  *
28  * @see PriorityQueue
29  */
30 public abstract class Gee.AbstractQueue<G> : Gee.AbstractCollection<G>, Queue<G> {
31         /**
32          * {@inheritDoc}
33          */
34         public abstract int capacity { get; }
35
36         /**
37          * {@inheritDoc}
38          */
39         public abstract int remaining_capacity { get; }
40
41         /**
42          * {@inheritDoc}
43          */
44         public abstract bool is_full { get; }
45
46         /**
47          * {@inheritDoc}
48          */
49         public abstract G? peek ();
50
51         /**
52          * {@inheritDoc}
53          */
54         public abstract G? poll ();
55
56         // Future-proofing
57         internal new virtual void reserved0() {}
58         internal new virtual void reserved1() {}
59         internal new virtual void reserved2() {}
60         internal new virtual void reserved3() {}
61         internal new virtual void reserved4() {}
62         internal new virtual void reserved5() {}
63         internal new virtual void reserved6() {}
64         internal new virtual void reserved7() {}
65         internal new virtual void reserved8() {}
66         internal new virtual void reserved9() {}
67 }