merge: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([a-zA-Z0-9_]+) +\[\[([a-zA-Z0-9_]+)\]\] +([a-zA-Z0-9_]+);?<\/code>" to "<sqf>$1 $2 $3;</sqf>") |
||
Line 26: | Line 26: | ||
|r2= [[Nothing]] | |r2= [[Nothing]] | ||
|x1= < | |x1= <sqf>_hashMap merge _otherHashMap;</sqf> | ||
|seealso= [[insert]] [[set]] | |seealso= [[insert]] [[set]] | ||
}} | }} |
Revision as of 13:25, 5 May 2022
Description
Syntax
- Syntax:
- hashMap1 merge hashMap2
- Parameters:
- hashMap1: HashMap - This HashMap will be modified
- hashMap2: HashMap - All key-value pairs from this HashMap are added to hashMap1. If a key from hashMap2 already exists in hashMap1, then its value is overwritten with the corresponding value from hashMap2
- Return Value:
- Nothing
Alternative Syntax
- Syntax:
- hashMap1 merge [hashMap2, overwriteExisting]
- Parameters:
- hashMap1: HashMap - This HashMap will be modified
- hashMap2: HashMap - All key-value pairs from this HashMap are added to hashMap1
- overwriteExisting (Optional, default: false): Boolean - If true, keys from hashMap1 that also exist in hashMap2 are overwritten. When set to true, merging is faster
- Return Value:
- Nothing
Examples
- Example 1:
- _hashMap merge _otherHashMap;
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note