* Copy struct (shallow copy) * @this {!StructSet} * @param {!StructSet} other Other struct * @returns {!StructSet} This struct
(other)
| 18483 | * @returns {!StructSet} This struct |
| 18484 | */ |
| 18485 | copy (other) { |
| 18486 | if (other.f1 != null) { |
| 18487 | this.f1 = new Set() |
| 18488 | for (let item of other.f1) { |
| 18489 | if (item != null) { |
| 18490 | let tempItem |
| 18491 | tempItem = item |
| 18492 | this.f1.add(tempItem) |
| 18493 | } else { |
| 18494 | this.f1.add(undefined) |
| 18495 | } |
| 18496 | } |
| 18497 | } else { |
| 18498 | this.f1 = undefined |
| 18499 | } |
| 18500 | if (other.f2 != null) { |
| 18501 | this.f2 = new Set() |
| 18502 | for (let item of other.f2) { |
| 18503 | if (item != null) { |
| 18504 | let tempItem |
| 18505 | tempItem = EnumSimple.fromObject(item) |
| 18506 | this.f2.add(tempItem) |
| 18507 | } else { |
| 18508 | this.f2.add(undefined) |
| 18509 | } |
| 18510 | } |
| 18511 | } else { |
| 18512 | this.f2 = undefined |
| 18513 | } |
| 18514 | if (other.f3 != null) { |
| 18515 | this.f3 = new Set() |
| 18516 | for (let item of other.f3) { |
| 18517 | if (item != null) { |
| 18518 | let tempItem |
| 18519 | tempItem = FlagsSimple.fromObject(item) |
| 18520 | this.f3.add(tempItem) |
| 18521 | } else { |
| 18522 | this.f3.add(undefined) |
| 18523 | } |
| 18524 | } |
| 18525 | } else { |
| 18526 | this.f3 = undefined |
| 18527 | } |
| 18528 | if (other.f4 != null) { |
| 18529 | this.f4 = new Set() |
| 18530 | for (let item of other.f4) { |
| 18531 | if (item != null) { |
| 18532 | let tempItem |
| 18533 | tempItem = StructSimple.fromObject(item) |
| 18534 | this.f4.add(tempItem) |
| 18535 | } else { |
| 18536 | this.f4.add(undefined) |
| 18537 | } |
| 18538 | } |
| 18539 | } else { |
| 18540 | this.f4 = undefined |
| 18541 | } |
| 18542 | return this |
no test coverage detected