ArrayQueue
Object Hierarchy:
Gee.ArrayQueue
Gee.ArrayQueue
Gee.ArrayQueue
Gee.AbstractQueue
Gee.AbstractQueue
Gee.AbstractQueue->Gee.ArrayQueue
Gee.AbstractCollection
Gee.AbstractCollection
Gee.AbstractCollection->Gee.AbstractQueue
GLib.Object
GLib.Object
GLib.Object->Gee.AbstractCollection
Gee.Traversable
Gee.Traversable
Gee.Traversable->Gee.AbstractCollection
Gee.Iterable
Gee.Iterable
Gee.Iterable->Gee.AbstractCollection
Gee.Collection
Gee.Collection
Gee.Collection->Gee.AbstractCollection
Gee.Queue
Gee.Queue
Gee.Queue->Gee.AbstractQueue
Gee.Deque
Gee.Deque
Gee.Deque->Gee.ArrayQueue
Description:
public class ArrayQueue <
G > :
AbstractQueue <
G >,
Deque <
G >
Resizable array implementation of the Deque interface.
The storage array grows automatically when needed.
This implementation is pretty good for lookups at the end or random. Because they are stored in an array this structure does not fit for
deleting arbitrary elements. For an alternative implementation see LinkedList .
Example: Demonstrate the use of ArrayQueue:
void main () { var queue = new Gee.ArrayQueue<string > (); queue.offer ("hello" ); queue.offer ("this" ); queue.offer ("time" ); foreach (string s in queue) print (" %s \n " , s); }
valac --pkg gee-0.8 Gee.ArrayQueue.vala
See also:
LinkedList
Content:
Properties:
Creation methods:
Methods:
public override bool @foreach (ForallFunc <G > f)
public override bool add (G element)
Adds an item to this collection. Must not be called on read-only
collections.
public override void clear ()
Removes all items from this collection. Must not be called on read-
only collections.
public override bool contains (G item)
Determines whether this collection contains the specified item.
public override Iterator <G > iterator ()
Returns a Iterator
that can be used for simple iteration over a collection.
public override G peek ()
public override G poll ()
public override bool remove (G item)
Removes the first occurrence of an item from this collection. Must not
be called on read-only collections.
Inherited Members:
All known members inherited from class Gee.AbstractQueue
All known members inherited from class Gee.AbstractCollection
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface Gee.Deque
All known members inherited from interface Gee.Queue
All known members inherited from interface Gee.Traversable
All known members inherited from interface Gee.Iterable
All known members inherited from interface Gee.Collection