code: public static <T extends Annotation> boolean doOverlap(final T anno1, final T anno2)
      {
          return anno1.getEnd() > anno2.getBegin() && anno1.getBegin() < anno2.getEnd();
      }
docs: Returns whether the given annotations have a non-empty overlap.
  
  <p>
  Note that this method is symmetric. Two annotations overlap
  if they have at least one character position in common.
  Annotations that merely touch at the begin or end are not
  overlapping.
  </p>
  <ul>
  <li>anno1[0,1], anno2[1,2] =&gt; no overlap</li>
  <li>anno1[0,2], anno2[1,2] =&gt; overlap</li>
  <li>anno1[0,2], anno2[0,2] =&gt; overlap (same span)</li>
  </ul>
  
  @param anno1 first annotation
  @param anno2 second annotation
  @return whether the annotations overlap