Iterator
Object Hierarchy:
Description:
public interface Iterator<
G> :
Object,
Traversable<
G>
An iterator over a collection.
Gee's iterators are "on-track" iterators. They always point to an item except before the first call to
next, or, when an item has been removed, until the next call to
next.
Please note that when the iterator is out of track, neither get nor
remove are defined and both might fail. After the next call to
next, they will be defined again.
Please also note that, unless specified otherwise, iterators before iteration started should behave as if after deletion of the first
element. Whenever documentation states about the iterator 'out of track', 'invalid' or 'in-between elements' this refers to the same
concept.
All known sub-interfaces:
Content:
Properties:
- public abstract bool read_only { get; }
Determines wheather the call to
remove is legal assuming the iterator is valid. The value must not
change in runtime hence the user of iterator may cache it.
- public abstract bool valid { get; }
Determines wheather the call to
get is legal. It is false at the beginning and after
remove call and true otherwise.
Static methods:
Methods:
- public abstract G @get ()
Returns the current element in the iteration.
- public abstract bool has_next ()
Checks whether there is a next element in the iteration.
- public abstract bool next ()
Advances to the next element in the iteration.
- public abstract void remove ()
Removes the current element in the iteration. The cursor is set in an
in-between state. Both get and remove
will fail until the next move of the cursor (calling next).
Inherited Members:
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.Traversable