List of utility methods to do Array Region Match
boolean | arrayRegionMatches(char[] source, int sourceStart, char[] target, int targetStart, int len) Convenience utility to compare two char[]s. 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; |
boolean | arrayRegionMatches(Object[] source, int sourceStart, Object[] target, int targetStart, int len) Convenience utility to compare two Object[]s Ought to be in System. int sourceEnd = sourceStart + len; int delta = targetStart - sourceStart; for (int i = sourceStart; i < sourceEnd; i++) { if (!arrayEquals(source[i], target[i + delta])) return false; return true; |
boolean | arrayRegionMatches(Object[] source, int sourceStart, Object[] target, int targetStart, int len) Convenience utility to compare two Object[]s Ought to be in System. int sourceEnd = sourceStart + len; int delta = targetStart - sourceStart; for (int i = sourceStart; i < sourceEnd; i++) { if (!arrayEquals(source[i], target[i + delta])) return false; return true; |
boolean | arrayRegionsEqual(boolean[] a, int aoff, int alen, boolean[] b, int boff, int blen) array Regions Equal if (alen != blen) return false; else { for (int i = 0; i < alen; ++i) if (a[aoff + i] != b[boff + i]) return false; return true; |