(other: NodeCursor)
| 947 | } |
| 948 | |
| 949 | greaterThan(other: NodeCursor): boolean { |
| 950 | const thisChain = this.getChainToRoot() |
| 951 | const otherChain = other.getChainToRoot() |
| 952 | let i = 0 |
| 953 | while (i < thisChain.length && i < otherChain.length) { |
| 954 | if (thisChain[i] > otherChain[i]) { |
| 955 | return true |
| 956 | } else if (thisChain[i] < otherChain[i]) { |
| 957 | return false |
| 958 | } |
| 959 | i++ |
| 960 | } |
| 961 | if (thisChain.length > otherChain.length) { |
| 962 | return thisChain[otherChain.length] >= 0 |
| 963 | } |
| 964 | return false |
| 965 | } |
| 966 | } |
no test coverage detected