protected void assertRange ( int index , boolean allowLast ) { final int csize = expurge ( ) ; if ( index < 0 ) { throw new IndexOutOfBoundsException ( Locale . getString ( "E1" , index ) ) ; //$NON-NLS-1$ } if ( allowLast && ( index > csize ) ) { throw new IndexOutOfBoundsException ( Locale . getString ( "E2" , csize , index ) ) ; //$NON-NLS-1$ } if ( ! allowLast && ( index >= csize ) ) { throw new IndexOutOfBoundsException ( Locale . getString ( "E3" , csize , index ) ) ; //$NON-NLS-1$ } }
Verify if the specified index is inside the array .