ColumnRange removeColumn ( int column ) { // first, let's see if this is a 1-column range that should // be destroyed if ( isSingleCol ( ) ) { return null ; } else if ( column == left ) { left ++ ; return this ; } else if ( column + 1 == right ) { right -- ; return this ; } else { ColumnRange created = new ColumnRange ( this . element , this . locator , column + 1 , this . right ) ; created . next = this . next ; this . next = created ; this . right = column ; return created ; } }
Removes a column from the range possibly asking it to be destroyed or splitting it .