question: public void removeIndexInterval ( int index0 , int index1 ) { int rmMinIndex = Math . min ( index0 , index1 ) ; int rmMaxIndex = Math . max ( index0 , index1 ) ; int gapLength = ( rmMaxIndex - rmMinIndex ) + 1 ; for ( int i = rmMinIndex ; i <= maxIndex ; i ++ ) { setState ( i , value . get ( i + gapLength ) ) ; } int leadIndex = this . leadIndex ; if ( leadIndex == 0 && rmMinIndex == 0 ) { } else if ( leadIndex > rmMaxIndex ) { leadIndex = this . leadIndex - gapLength ; } else if ( leadIndex >= rmMinIndex ) { leadIndex = rmMinIndex - 1 ; } int anchorIndex = this . anchorIndex ; if ( anchorIndex == 0 && rmMinIndex == 0 ) { } else if ( anchorIndex > rmMaxIndex ) { anchorIndex = this . anchorIndex - gapLength ; } else if ( anchorIndex >= rmMinIndex ) { anchorIndex = rmMinIndex - 1 ; } if ( leadIndex != this . leadIndex || anchorIndex != this . anchorIndex ) { updateLeadAnchorIndices ( anchorIndex , leadIndex ) ; } fireValueChanged ( ) ; }
target:  Remove the indices in the interval index0,index1 (inclusive) from the selection model.  This is typically called to sync the selection model width a corresponding change in the data model.  Note that (as always) index0 need not be &lt;= index1.