subRanges property
excludes 를 제외한 부분범위 리스트를 반환합니다.
Implementation
List<_NumRange<T>> get subRanges {
if (!_hasExcludes) return [this];
T currentStart = start;
return excludes!.fold(<_NumRange<T>>[], (ranges, exclude) {
if (exclude.start > currentStart) {
ranges.add(_NumRange<T>(currentStart, exclude.start));
}
currentStart = exclude.end;
return ranges;
})..addIf(currentStart < end, _NumRange<T>(currentStart, end));
}