setMethod("elementLengths", "Ranges", function(x) setNames(width(x), names(x)))
setMethod("start", "Ranges", function(x, ...) {end(x) - width(x) + 1L})
setMethod("width", "Ranges", function(x) {end(x) - start(x) + 1L})
setMethod("end", "Ranges", function(x, ...) {start(x) + width(x) - 1L})
setMethod("mid", "Ranges", function(x) start(x) + as.integer((width(x)-1) / 2))
as.data.frame.Ranges <- function(x, row.names=NULL, optional=FALSE, ...)
stop("\"unlist\" method for Ranges objects ",
ans <- as.integer(x)  # 'ans' should have no names
showme$names <- .sketch(NAMES, nhead, ntail)
.sketch <- function(x, nhead, ntail, rownames=FALSE)
paste("[", format(start(object)), ", ", format(end(object)), "]",
setMethod("isEmpty", "Ranges", function(x) all(width(x) == 0L))
all_ok <- all_ok && all(start(x)[-1L] - end(x)[-length(x)] >= 2L)
is_ok <- is_ok & c(TRUE, start(x)[-1L] - end(x)[-length(x)] >= 2L)

### Ranges are ordered by starting position first and then by width.
### This way, the space of ranges is totally ordered.
### This "compare" method returns one of the 13 predefined codes (>= -6 and
### <= 6) described in the man page. The signs of those codes reflect this
"'match.if.overlap' must be TRUE or FALSE"
"match() on Ranges objects\n  does not support "
"the 'match.if.overlap' argument anymore. Please use\n\n"
##     findOverlaps(x, table, type="equal", select="first")
## except when 'x' and 'table' both contain empty ranges.
"selfmatch() on a Ranges object\n  does not support "
### The "order" and "rank" methods for Ranges objects are consistent with
## All arguments in '...' are guaranteed to be Ranges objects.
"only 'ties.method=\"first\"' is supported "
## 'ans' is the reverse permutation of 'oo'

stop("'code' must be an integer vector")
stop("\"match\" method for Ranges objects ",
stop("'match.if.overlap' must be TRUE or FALSE")
"match() on Ranges objects\n  does not support ",
"the 'match.if.overlap' argument anymore. Please use\n\n",
ans <- findOverlaps(x, table, select="first")
function(x, method=c("auto", "quick", "hash"), match.if.overlap=FALSE)
msg <- c("  Starting with BioC 2.14), ",
"selfmatch() on a Ranges object\n  does not support ",
stop("'decreasing' must be TRUE or FALSE")
order_args[idx - 1L] <- lapply(args, start)
if (!missing(ties.method) && !identical(ties.method, "first"))
stop("only 'ties.method=\"first\"' is supported ",