public Interval overlap(ReadableInterval interval){
  interval=DateTimeUtils.getReadableInterval(interval);
  if (overlaps(interval) == false) {
    return null;
  }
  long start=Math.max(getStartMillis(),interval.getStartMillis());
  long end=Math.min(getEndMillis(),interval.getEndMillis());
  return new Interval(start,end,getChronology());
}

public Interval overlap ( ReadableInterval interval ) { interval = DateTimeUtils . getReadableInterval ( interval ) ; if ( overlaps ( interval ) == false ) { return null ; } long start = Math . max ( getStartMillis ( ) , interval . getStartMillis ( ) ) ; long end = Math . min ( getEndMillis ( ) , interval . getEndMillis ( ) ) ; return new Interval ( start , end , getChronology ( ) ) ; }
gets the overlap between this interval and another interval . < p > intervals are inclusive of the start instant and exclusive of the end . an interval overlaps another if it shares some common part of the datetime continuum . this method returns the amount of the overlap , only if the intervals actually do overlap . if the intervals do not overlap , then null is returned . < p > when two intervals are compared the result is one of three states : ( a ) they abut , ( b ) there is a gap between them , ( c ) they overlap . the abuts state takes precedence over the other two , thus a zero duration interval at the start of a larger interval abuts and does not overlap . < p > the chronology of the returned interval is the same as that of this interval ( the chronology of the interval parameter is not used ) . note that the use of the chronology was only correctly implemented in version 1 . 3 .
