code: public boolean encloses(int regionOffset, int regionLength, int offset, boolean includeRegionEnd) {
  		if (offset < 0)
  			// TODO should this be "return false;" instead?
  			throw new IllegalArgumentException("offset may not be negative");
  		int relativeOffset = offset - regionOffset;
  		boolean result = relativeOffset == 0 || (relativeOffset > 0 && (includeRegionEnd ? relativeOffset <= regionLength : relativeOffset < regionLength));
  		return result;
  	}
docs: Calculate whether the given {@code region} encloses the offset.
  @param regionOffset the start of the region that should be checked.
  @param regionLength the length of the region that should be checked.
  @param offset the offset that should be enclosed by the region.
  @param includeRegionEnd whether a region is enclosing the offset if it ends at that location.
  @return <code>true</true> if the given region encloses the offset.
  @nooverride This method is not intended to be re-implemented or extended by clients.
  @noreference This method is not intended to be referenced by clients.