I assume that only a single range is expected (allowed?) if `isAll()` is true. You might want to add a check to ensure that getRanges() has only one element in this case.