Exemplo n.º 1
0
 /**
  * Determine whether there is any overlap between this interval and the specified interval
  *
  * <p>Negative positions have no special meaning
  *
  * @param chr
  * @param start
  * @param end
  * @return
  */
 public boolean overlaps(String chr, int start, int end) {
   return Objects.equal(this.chr, chr) && this.start <= end && this.end >= start;
 }
Exemplo n.º 2
0
 /**
  * Determine whether this interval fully contains the specified input interval.
  *
  * <p>A negative input start position has special meaning. It is considered within the interval if
  * the interval contains position "0".
  *
  * @param chr
  * @param start
  * @param end
  * @return
  */
 public boolean contains(String chr, int start, int end) {
   return Objects.equal(this.chr, chr) && this.start <= (start < 0 ? 0 : start) && this.end >= end;
 }