question: 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 ( ) ) ; }
target:  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.