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
All known members inherited from interface Gee.Traversable
All known members inherited from interface Gee.Iterable
All known members inherited from interface Gee.Map