public void add ( Composite start , Composite end , long markedAt , int delTime ) { if ( isEmpty ( ) ) { addInternal ( 0 , start , end , markedAt , delTime ) ; return ; } int c = comparator . compare ( ends [ size - 1 ] , start ) ; // Fast path if we add in sorted order if ( c <= 0 ) { addInternal ( size , start , end , markedAt , delTime ) ; } else { // Note: insertFrom expect i to be the insertion point in term of interval ends int pos = Arrays . binarySearch ( ends , 0 , size , start , comparator ) ; insertFrom ( ( pos >= 0 ? pos : - pos - 1 ) , start , end , markedAt , delTime ) ; } boundaryHeapSize += start . unsharedHeapSize ( ) + end . unsharedHeapSize ( ) ; }
Adds a new range tombstone .