@Test public void testOverlaps() { final Entity a = new Entity(jCas); a.setBegin(0); a.setEnd(10); final Entity b = new Entity(jCas); b.setBegin(8); b.setEnd(15); final Entity c = new Entity(jCas); c.setBegin(20); c.setEnd(30); assertTrue(ComparableEntitySpanUtils.overlaps(a, b)); assertTrue(ComparableEntitySpanUtils.overlaps(b, a)); assertFalse(ComparableEntitySpanUtils.overlaps(a, c)); assertFalse(ComparableEntitySpanUtils.overlaps(c, a)); }
public static boolean overlaps(Annotation a, Annotation b) { return !(a.getEnd() < b.getBegin() || b.getEnd() < a.getBegin()); }
ComparableEntitySpanUtils { public static boolean overlaps(Annotation a, Annotation b) { return !(a.getEnd() < b.getBegin() || b.getEnd() < a.getBegin()); } }
ComparableEntitySpanUtils { public static boolean overlaps(Annotation a, Annotation b) { return !(a.getEnd() < b.getBegin() || b.getEnd() < a.getBegin()); } private  ComparableEntitySpanUtils(); }
ComparableEntitySpanUtils { public static boolean overlaps(Annotation a, Annotation b) { return !(a.getEnd() < b.getBegin() || b.getEnd() < a.getBegin()); } private  ComparableEntitySpanUtils(); static Entity copyEntity(JCas jCas, int begin, int end, Entity entity); static Interaction copyInteraction(JCas jCas, int begin, int end, Interaction annotation); static boolean overlaps(Annotation a, Annotation b); }
ComparableEntitySpanUtils { public static boolean overlaps(Annotation a, Annotation b) { return !(a.getEnd() < b.getBegin() || b.getEnd() < a.getBegin()); } private  ComparableEntitySpanUtils(); static Entity copyEntity(JCas jCas, int begin, int end, Entity entity); static Interaction copyInteraction(JCas jCas, int begin, int end, Interaction annotation); static boolean overlaps(Annotation a, Annotation b);  }