Map
Object Hierarchy:
Description:
[
GenericAccessors ]
public interface Map<
K,
V> :
Object,
Iterable<
Entry<
K,
V>>
An object that maps keys to values.
All known implementing classes:
All known sub-interfaces:
Content:
Classes:
- Entry - An entry of a map.
Properties:
- public abstract Set<Entry<K,V>> entries { owned get; }
The read-only view of the entries of this map.
- public virtual bool is_empty { get; }
Specifies whether this map is empty.
- public Type key_type { get; }
The type of the keys in 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 abstract 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 Type value_type { get; }
The type of the values in this map.
- public abstract Collection<V> values { owned get; }
The read-only view of the values of this map.
Static methods:
Methods:
- 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 bool contains (K key)
Determines whether this map contains the specified key.
- public bool contains_all (Map<K,V> map)
Returns true
if this map contains all the same items as the
input map.
- public abstract bool has (K key, V value)
Determines whether this map has the specified key/value entry.
- public virtual bool has_all (Map<K,V> map)
Returns true
if this map contains all the same items as the
input map.
- 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 bool remove (K key, out V value = null)
Removes the specified key from this map.
- public bool remove_all (Map<K,V> map)
Removes all items from this map that are common to the input map and this
map.
- public virtual void set_all (Map<K,V> map)
Inserts all items that are contained in the input map to this map.
- public abstract bool unset (K key, out V value = null)
Removes the specified key from this map.
- public virtual bool unset_all (Map<K,V> map)
Removes all items from this map that are common to the input map and this
map.
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface Gee.Iterable