private void checkRange ( long index ) { Assert . indexNot ( isEmpty ( ) , "segment is empty" ) ; Assert . indexNot ( index < firstIndex ( ) , index + " is less than the first index in the segment" ) ; Assert . indexNot ( index > lastIndex ( ) , index + " is greater than the last index in the segment" ) ; }
Checks the range of the given index .