Maps


Object Hierarchy:

Object hierarchy for Maps

Description:

public class Maps : Object

Static utility methods for HashMap operations.

Maps provides high-level operations like merge, filter, mapValues, invert, and entries that would otherwise require 5-15 lines of manual loop code.

Example:

    var defaults = new HashMap<string, string> (GLib.str_hash, GLib.str_equal);
defaults.put ("theme", "light");
defaults.put ("lang", "en");
var overrides = new HashMap<string, string> (GLib.str_hash, GLib.str_equal);
overrides.put ("theme", "dark");
var config = Maps.mergeString (defaults, overrides);
// config: {"theme": "dark", "lang": "en"}


Namespace: Vala.Collections
Package: Valacore

Content:

Static methods:

Creation methods:

Inherited Members:

All known members inherited from class GLib.Object