* Static method for creating ArraySet instances from an existing array.
(aArray, aAllowDuplicates)
| 27 | * Static method for creating ArraySet instances from an existing array. |
| 28 | */ |
| 29 | static fromArray(aArray, aAllowDuplicates) { |
| 30 | const set = new ArraySet(); |
| 31 | for (let i = 0, len = aArray.length; i < len; i++) { |
| 32 | set.add(aArray[i], aAllowDuplicates); |
| 33 | } |
| 34 | return set; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Return how many unique items are in this ArraySet. If duplicates have been |
no test coverage detected