* Splits this range into a list of two non-wrapping ranges. * * This will return the range itself if it is non-wrapped, or two * ranges otherwise. * * This is useful for CQL range queries, which do not handle * wrapping. * * @returns {TokenRange[]} The list of non-wrapping ra
()
| 208 | * @returns {TokenRange[]} The list of non-wrapping ranges. |
| 209 | */ |
| 210 | unwrap() { |
| 211 | if (this.isWrappedAround()) { |
| 212 | return [ |
| 213 | new TokenRange(this.start, this._tokenizer.minToken(), this._tokenizer), |
| 214 | new TokenRange(this._tokenizer.minToken(), this.end, this._tokenizer) |
| 215 | ]; |
| 216 | } |
| 217 | return [this]; |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Whether this range contains a given Token. |
nothing calls this directly
no test coverage detected