/** * Determines whether this interval overlaps the provided locatable. * * @param other interval to check * @return true if this interval overlaps other, otherwise false */ default boolean overlaps(Locatable other) { return withinDistanceOf(other, 0); }
/** * Determines whether this interval overlaps the provided locatable. * * @param other interval to check * @return true if this interval overlaps other, otherwise false */ default boolean overlaps(Locatable other) { return withinDistanceOf(other, 0); }
@Test(dataProvider = "overlapsWithMargin") public void testOverlapWithMargin(final Locatable firstInterval, final Locatable secondInterval, int margin, final boolean expectedOverlapResult ) { Assert.assertEquals(firstInterval.withinDistanceOf(secondInterval, margin), expectedOverlapResult, "overlap() returned incorrect result for intervals " + firstInterval + " and " + secondInterval); }