@Test public void testIsContainingWithHigherIntersect() { Span a = new Span(5000, 900); Span b = new Span(5000, 1000); assertFalse(a.isContaining(b)); }
public boolean isContaining(Span containingSpan) { boolean isStartContaining = getStart() <= containingSpan.getStart(); if (!isStartContaining) { return false; } return getEnd() >= containingSpan.getEnd(); }
Span implements Comparable<Span> { public boolean isContaining(Span containingSpan) { boolean isStartContaining = getStart() <= containingSpan.getStart(); if (!isStartContaining) { return false; } return getEnd() >= containingSpan.getEnd(); } }
Span implements Comparable<Span> { public boolean isContaining(Span containingSpan) { boolean isStartContaining = getStart() <= containingSpan.getStart(); if (!isStartContaining) { return false; } return getEnd() >= containingSpan.getEnd(); } Span(int start, int length); }
Span implements Comparable<Span> { public boolean isContaining(Span containingSpan) { boolean isStartContaining = getStart() <= containingSpan.getStart(); if (!isStartContaining) { return false; } return getEnd() >= containingSpan.getEnd(); } Span(int start, int length); int getStart(); int getLength(); int getEnd(); boolean isContaining(Span containingSpan); boolean isIntersecting(Span s); @Override int compareTo(Span span); @Override boolean equals(Object o); @Override String toString(); @Override int hashCode(); }
Span implements Comparable<Span> { public boolean isContaining(Span containingSpan) { boolean isStartContaining = getStart() <= containingSpan.getStart(); if (!isStartContaining) { return false; } return getEnd() >= containingSpan.getEnd(); } Span(int start, int length); int getStart(); int getLength(); int getEnd(); boolean isContaining(Span containingSpan); boolean isIntersecting(Span s); @Override int compareTo(Span span); @Override boolean equals(Object o); @Override String toString(); @Override int hashCode();  }