addAll

fun addAll(vararg items: Pair<T, R>): Boolean

Adds all relations A -> B. If any of the given items already exist, it gets ignored. If any item contains a key or value that already exists, the map remains unchanged.

Example: Map: (A->B), (C->D)

addAll(E->F),(G->H) results in (A->B), (C->D), (E->F),(G->H) : true

addAll(A->B),(E->F) results in (A->B), (C->D), (E->F), : true

addAll(A->C),(E->F) results in (A->B), (C->D) : false

Return

true if all elements were added to the map or were already contained, false otherwise.

See also