public static boolean canUseOriginalForSubSequence ( CharSequence str , int start , int count ) { if ( start != 0 ) return false ; final Class < ? > csqClass = str . getClass ( ) ; return ( csqClass == String . class || csqClass == StringBuilder . class || csqClass == StringBuffer . class ) && count == str . length ( ) ; }
Checks if start == 0 and count == length of CharSequence It does this check only for String StringBuilder and StringBuffer classes which have a fast way to check length