* Copy struct (shallow copy) * @this {!Order} * @param {!Order} other Other struct * @returns {!Order} This struct
(other)
| 748 | * @returns {!Order} This struct |
| 749 | */ |
| 750 | copy (other) { |
| 751 | if (other.id != null) { |
| 752 | this.id = other.id |
| 753 | } else { |
| 754 | this.id = undefined |
| 755 | } |
| 756 | if (other.symbol != null) { |
| 757 | this.symbol = other.symbol |
| 758 | } else { |
| 759 | this.symbol = undefined |
| 760 | } |
| 761 | if (other.side != null) { |
| 762 | this.side = OrderSide.fromObject(other.side) |
| 763 | } else { |
| 764 | this.side = undefined |
| 765 | } |
| 766 | if (other.type != null) { |
| 767 | this.type = OrderType.fromObject(other.type) |
| 768 | } else { |
| 769 | this.type = undefined |
| 770 | } |
| 771 | if (other.price != null) { |
| 772 | this.price = other.price |
| 773 | } else { |
| 774 | this.price = undefined |
| 775 | } |
| 776 | if (other.volume != null) { |
| 777 | this.volume = other.volume |
| 778 | } else { |
| 779 | this.volume = undefined |
| 780 | } |
| 781 | return this |
| 782 | } |
| 783 | |
| 784 | /** |
| 785 | * Clone struct (deep clone) |
no test coverage detected