AbstractMap
Object Hierarchy:
Description:
public abstract class AbstractMap<
K,
V> :
Object,
Traversable<
Entry<
K,
V>>,
Iterable<
Entry<
K,
V>>,
Map<
K,
V>
Skeletal implementation of the Map interface.
Contains common code shared by all map implementations.
See also:
HashMap, TreeMap
Content:
Properties:
- public abstract Set<Entry<K,V>> entries { owned get; }
The read-only view of the entries of this map.
- public abstract Set<K> keys { owned get; }
The read-only view of the keys of this map.
- public abstract bool read_only { get; }
Specifies whether this collection can change - i.e. whether
set, remove etc. are legal
operations.
- public virtual Map<K,V> read_only_view { owned get; }
The read-only view this map.
- public abstract int size { get; }
The number of items in this map.
- public abstract Collection<V> values { owned get; }
The read-only view of the values of this map.
Creation methods:
Methods:
- public virtual bool @foreach (ForallFunc<Entry<K,V>> f)
Apply function to each element returned by iterator until last element
or function return false.
- public abstract V @get (K key)
Returns the value of the specified key in this map.
- public abstract void @set (K key, V value)
Inserts a new key and value into this map.
- public abstract void clear ()
Removes all items from this collection. Must not be called on read-
only collections.
- public abstract bool has (K key, V value)
Determines whether this map has the specified key/value entry.
- public abstract bool has_key (K key)
Determines whether this map has the specified key.
- public abstract MapIterator<K,V> map_iterator ()
Returns an iterator for this map.
- public virtual Iterator<A> stream<A> (owned StreamFunc<Entry<K,V>,A> f)
Stream function is an abstract function allowing writing many
operations.
- public abstract bool unset (K key, out V value = null)
Removes the specified key from this map.
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
All known members inherited from interface Gee.Iterable
All known members inherited from interface Gee.Map