final static boolean arrayRegionMatches ( char [ ] source , int sourceStart , char [ ] target , int targetStart , int len ) { int sourceEnd = sourceStart + len ; int delta = targetStart - sourceStart ; for ( int i = sourceStart ; i < sourceEnd ; i ++ ) { if ( source [ i ] != target [ i + delta ] ) return false ; } return true ; }
Convenience utility to compare two arrays of doubles .