@Test public void shouldNotContainWhenOtherOverlapsAfter() { R range = getTestRange(from("10"), to("20")); R other = getTestRange(from("15"), to("25")); assertFalse(range.contains(other)); assertFalse(other.contains(range)); }
@Override public boolean contains(R other) { return other != null && (start.compareTo(other.start()) <= 0 && end.compareTo(other.end()) >= 0); }
AbstractRange implements Range<C, R> { @Override public boolean contains(R other) { return other != null && (start.compareTo(other.start()) <= 0 && end.compareTo(other.end()) >= 0); } }
AbstractRange implements Range<C, R> { @Override public boolean contains(R other) { return other != null && (start.compareTo(other.start()) <= 0 && end.compareTo(other.end()) >= 0); } protected  AbstractRange(C start, C end); }
AbstractRange implements Range<C, R> { @Override public boolean contains(R other) { return other != null && (start.compareTo(other.start()) <= 0 && end.compareTo(other.end()) >= 0); } protected  AbstractRange(C start, C end); @Override C start(); @Override C end(); @Override boolean contains(R other); @Override boolean contains(C value); @Override boolean overlaps(R other); @Override boolean isConsecutive(R other); @Override boolean isEmpty(); @Override R merge(R other); @Override R intersection(R other); @SuppressWarnings({"unchecked"}) @Override List<R> exclude(R other); @Override boolean isSameRange(R other); @Override String toString(); @Override Iterator<C> iterator(); @Override final boolean equals(Object o); @Override final int hashCode(); }
AbstractRange implements Range<C, R> { @Override public boolean contains(R other) { return other != null && (start.compareTo(other.start()) <= 0 && end.compareTo(other.end()) >= 0); } protected  AbstractRange(C start, C end); @Override C start(); @Override C end(); @Override boolean contains(R other); @Override boolean contains(C value); @Override boolean overlaps(R other); @Override boolean isConsecutive(R other); @Override boolean isEmpty(); @Override R merge(R other); @Override R intersection(R other); @SuppressWarnings({"unchecked"}) @Override List<R> exclude(R other); @Override boolean isSameRange(R other); @Override String toString(); @Override Iterator<C> iterator(); @Override final boolean equals(Object o); @Override final int hashCode();  }