ArrayQueue
Object Hierarchy:
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.
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 int drain_head (Collection<G> recipient, int amount = -1)
Drains the specified amount of elements from the head of this queue in
the specified recipient collection.
- public int drain_tail (Collection<G> recipient, int amount = -1)
Drains the specified amount of elements from the tail of this queue in
the specified recipient collection.
- public override Iterator<G> iterator ()
Returns a Iterator
that can be used for simple iteration over a collection.
- public bool offer_head (G element)
Offers the specified element to the head of this deque.
- public bool offer_tail (G element)
Offers the specified element to the tail of this deque
- public override G peek ()
- public G peek_head ()
Peeks (retrieves, but not remove) an element from this queue.
- public G peek_tail ()
Peeks (retrieves, but not remove) an element from the tail of this
queue.
- public override G poll ()
- public G poll_head ()
Polls (retrieves and remove) an element from the head of this queue.
- public G poll_tail ()
Polls (retrieves and remove) an element from the tail of this queue.
- public override bool remove (G item)
Removes the first occurence 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