HashMap


Object Hierarchy:

Object hierarchy for HashMap

Description:

public class HashMap<K,V> : Object

A hash table-based map from keys to values.

HashMap provides O(1) average-time lookup, insertion, and deletion. Inspired by Java's HashMap and Go's map.

For string keys and values, use GLib.str_hash and GLib.str_equal.

Example:

    var map = new HashMap<string,string> (GLib.str_hash, GLib.str_equal);
map.put ("name", "Alice");
map.put ("city", "Tokyo");
assert (map.get ("name") == "Alice");
assert (map.size () == 2);


Namespace: Vala.Collections
Package: Valacore

Content:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class GLib.Object