protected int validateRange ( final int startIndex , int endIndex ) { if ( startIndex < 0 ) { throw new StringIndexOutOfBoundsException ( startIndex ) ; } if ( endIndex > size ) { endIndex = size ; } if ( startIndex > endIndex ) { throw new StringIndexOutOfBoundsException ( "end < start" ) ; } return endIndex ; }
Validates parameters defining a range of the builder .