* Copy struct (shallow copy) * @this {!Order} * @param {!Order} other Other struct * @returns {!Order} This struct
(other)
| 777 | * @returns {!Order} This struct |
| 778 | */ |
| 779 | copy (other) { |
| 780 | if (other.id != null) { |
| 781 | this.id = other.id |
| 782 | } else { |
| 783 | this.id = undefined |
| 784 | } |
| 785 | if (other.symbol != null) { |
| 786 | this.symbol = other.symbol |
| 787 | } else { |
| 788 | this.symbol = undefined |
| 789 | } |
| 790 | if (other.side != null) { |
| 791 | this.side = OrderSide.fromObject(other.side) |
| 792 | } else { |
| 793 | this.side = undefined |
| 794 | } |
| 795 | if (other.type != null) { |
| 796 | this.type = OrderType.fromObject(other.type) |
| 797 | } else { |
| 798 | this.type = undefined |
| 799 | } |
| 800 | if (other.price != null) { |
| 801 | this.price = other.price |
| 802 | } else { |
| 803 | this.price = undefined |
| 804 | } |
| 805 | if (other.volume != null) { |
| 806 | this.volume = other.volume |
| 807 | } else { |
| 808 | this.volume = undefined |
| 809 | } |
| 810 | if (other.tp != null) { |
| 811 | this.tp = other.tp |
| 812 | } else { |
| 813 | this.tp = undefined |
| 814 | } |
| 815 | if (other.sl != null) { |
| 816 | this.sl = other.sl |
| 817 | } else { |
| 818 | this.sl = undefined |
| 819 | } |
| 820 | return this |
| 821 | } |
| 822 | |
| 823 | /** |
| 824 | * Clone struct (deep clone) |
no test coverage detected