x0 <- as(x, "IRanges")  # downgrade x to IRanges
x0 <- reduce(c(x0, y), drop.empty.ranges=TRUE)
xy <- c(unlist(x, use.names = FALSE), unlist(y, use.names = FALSE))
xy_list <- split(xy, factor(c(togroup(x), togroup(y)),
function(x, y) mendoapply(intersect, x, y))
rx <- unlist(range(x), use.names = FALSE)
setdiff(x, gaps(y, start = startx, end = endx))
setMethod("intersect", c("Hits", "Hits"), function(x, y) {
stop("'x' and 'y' are incompatible by subject and query length")
gaps(union(gaps(x, start=start, end=end), y), start=start, end=end)
function(x, y) mendoapply(setdiff, x, y))
gaps(union(gaps(x), y), start = startx, end = endx)
setMethod("setdiff", c("Hits", "Hits"), function(x, y) {
stop("'x' and 'y' must have the same length")
stop("'fill.gap' must be TRUE or FALSE")
stop("some pair of ranges have a gap within ",
"  Use 'fill.gap=TRUE' to enforce their ",
function(x, y, resolve.empty=c("none", "max.start", "start.x"), ...)
((start(x) >= start(y) & start(x) <= end(y)) |
(start(x) == start(y) & width(y) == 0L))
start(y) >= start(x) & start(y) <= end(x)
check_empty[keep_empty_x | keep_empty_y] <- FALSE
stop("some intersections produce ambiguous empty ranges.\n",
"  Use argument 'resolve.empty' to resolve them.")
if (any((start(y) > ans_start) & (end(y) < ans_end)))
stop("some ranges in 'y' have their end points strictly inside\n",
"  the range in 'x' that they need to be subtracted from.\n",
ans_start <- pmin.int(end(x), end(y)) + 1L

"the 'listData' slot must be a list containing"
## NOTE: while the 'c' function does not have an 'x', the generic does

return(paste("the 'listData' slot must be a list containing",
aggregate(x[[i]], by = by[[i]], FUN = FUN,
stop("all results must be of class '", elementTypeX, "'")
slot(X, "listData", check=FALSE) <- listData
as.list.SimpleList <- function(x, ...) .as.list.SimpleList(x, ...)
coerceToSimpleList <- function(from, element.type, ...) {
listData <- lapply(listData, coercerToClass(element.type), ...)

function(x, lower=-Inf, upper=Inf, ...) standardGeneric("slice"))
includeLower = TRUE, includeUpper = TRUE,
stop("'includeLower' must be TRUE or FALSE")
stop("'includeUpper' must be TRUE or FALSE")
stop("'rangesOnly' must be TRUE or FALSE")