TextContent (List<TextContent.Exclusion> ranges, TextContent initial) { TextContent result = initial; for (TextContent.Exclusion exclusion : ContainerUtil.reverse(ranges)) { TextRange range = new TextRange(exclusion.start, exclusion.end); result = exclusion.kind == TextContent.ExclusionKind.unknown ? result.markUnknown(range) : result.excludeRange(range); } return result; }