MapIterator
Object Hierarchy:
Description:
[ GenericAccessors ]
public interface MapIterator<K,V> : Object
An iterator over a map.
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_key,
get_value,
set_value nor
unset are defined and all will fail. After the next call to
next, they will be defined again.
All known sub-interfaces:
Content:
Properties:
- public abstract bool mutable { get; }
Determines whether the call to
set_value 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 read_only { get; }
Determines whether the call to
unset 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; }
Methods:
- public virtual bool @foreach (ForallMapFunc<K,V> f)
Apply function to each element returned by iterator.
- public virtual A fold<A> (FoldMapFunc<A,K,V> f, owned A seed)
Standard aggregation function.
- public abstract K get_key ()
Returns the current key in the iteration.
- public abstract V get_value ()
Returns the value associated with the current key in the iteration.
- public abstract bool has_next ()
Checks whether there is a next entry in the iteration.
- public abstract bool next ()
Advances to the next entry in the iteration.
- public abstract void set_value (V value)
Sets the value associated with the current key in the iteration.
- public abstract void unset ()
Unsets the current entry in the iteration. The cursor is set in an in-
between state. get_key,
get_value,
set_value and unset 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