merge: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 12: | Line 12: | ||
|p1= hashMap1: [[HashMap]] - This HashMap will be modified | |p1= hashMap1: [[HashMap]] - This HashMap will be modified | ||
|p2= hashMap2: [[HashMap]] - All key-value pairs from this HashMap are added to ''hashMap1''. If a key from ''hashMap2'' already exists in ''hashMap1'', | |p2= hashMap2: [[HashMap]] - All key-value pairs from this HashMap are added to ''hashMap1''. If a key from ''hashMap2'' already exists in ''hashMap1'', it doesn't overwrite the value in ''hashMap1''. | ||
|r1= [[Nothing]] | |r1= [[Nothing]] |
Revision as of 10:54, 6 July 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, it doesn't overwrite the value in hashMap1.
- 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