7476 * it follows that the relative index is only valid for the array with the
7477 * larger range.
7478 * Otherwise, there is no mismatch.
7479 *
7480 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7481 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7482 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7483 * prefix of length {@code pl} if the following expression is true:
7484 * <pre>{@code
7485 * pl >= 0 &&
7486 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7487 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7488 * a[aFromIndex + pl] != b[bFromIndex + pl]
7489 * }</pre>
7490 * Note that a common prefix length of {@code 0} indicates that the first
7491 * elements from each array mismatch.
7492 *
7493 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7494 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7495 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
7496 * if the following expression is true:
7497 * <pre>{@code
7498 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
7499 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
7500 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
7501 * }</pre>
7502 *
7503 * @param a the first array to be tested for a mismatch
7504 * @param aFromIndex the index (inclusive) of the first element in the
7505 * first array to be tested
7506 * @param aToIndex the index (exclusive) of the last element in the
7507 * first array to be tested
7508 * @param b the second array to be tested for a mismatch
7509 * @param bFromIndex the index (inclusive) of the first element in the
7510 * second array to be tested
7511 * @param bToIndex the index (exclusive) of the last element in the
7512 * second array to be tested
7513 * @return the relative index of the first mismatch between the two arrays
7514 * over the specified ranges, otherwise {@code -1}.
7515 * @throws IllegalArgumentException
7516 * if {@code aFromIndex > aToIndex} or
7603 * it follows that the relative index is only valid for the array with the
7604 * larger range.
7605 * Otherwise, there is no mismatch.
7606 *
7607 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7608 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7609 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7610 * prefix of length {@code pl} if the following expression is true:
7611 * <pre>{@code
7612 * pl >= 0 &&
7613 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7614 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7615 * a[aFromIndex + pl] != b[bFromIndex + pl]
7616 * }</pre>
7617 * Note that a common prefix length of {@code 0} indicates that the first
7618 * elements from each array mismatch.
7619 *
7620 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7621 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7622 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
7623 * if the following expression is true:
7624 * <pre>{@code
7625 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
7626 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
7627 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
7628 * }</pre>
7629 *
7630 * @param a the first array to be tested for a mismatch
7631 * @param aFromIndex the index (inclusive) of the first element in the
7632 * first array to be tested
7633 * @param aToIndex the index (exclusive) of the last element in the
7634 * first array to be tested
7635 * @param b the second array to be tested for a mismatch
7636 * @param bFromIndex the index (inclusive) of the first element in the
7637 * second array to be tested
7638 * @param bToIndex the index (exclusive) of the last element in the
7639 * second array to be tested
7640 * @return the relative index of the first mismatch between the two arrays
7641 * over the specified ranges, otherwise {@code -1}.
7642 * @throws IllegalArgumentException
7643 * if {@code aFromIndex > aToIndex} or
7730 * it follows that the relative index is only valid for the array with the
7731 * larger range.
7732 * Otherwise, there is no mismatch.
7733 *
7734 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7735 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7736 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7737 * prefix of length {@code pl} if the following expression is true:
7738 * <pre>{@code
7739 * pl >= 0 &&
7740 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7741 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7742 * a[aFromIndex + pl] != b[bFromIndex + pl]
7743 * }</pre>
7744 * Note that a common prefix length of {@code 0} indicates that the first
7745 * elements from each array mismatch.
7746 *
7747 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7748 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7749 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
7750 * if the following expression is true:
7751 * <pre>{@code
7752 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
7753 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
7754 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
7755 * }</pre>
7756 *
7757 * @param a the first array to be tested for a mismatch
7758 * @param aFromIndex the index (inclusive) of the first element in the
7759 * first array to be tested
7760 * @param aToIndex the index (exclusive) of the last element in the
7761 * first array to be tested
7762 * @param b the second array to be tested for a mismatch
7763 * @param bFromIndex the index (inclusive) of the first element in the
7764 * second array to be tested
7765 * @param bToIndex the index (exclusive) of the last element in the
7766 * second array to be tested
7767 * @return the relative index of the first mismatch between the two arrays
7768 * over the specified ranges, otherwise {@code -1}.
7769 * @throws IllegalArgumentException
7770 * if {@code aFromIndex > aToIndex} or
7857 * it follows that the relative index is only valid for the array with the
7858 * larger range.
7859 * Otherwise, there is no mismatch.
7860 *
7861 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7862 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7863 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7864 * prefix of length {@code pl} if the following expression is true:
7865 * <pre>{@code
7866 * pl >= 0 &&
7867 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7868 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7869 * a[aFromIndex + pl] != b[bFromIndex + pl]
7870 * }</pre>
7871 * Note that a common prefix length of {@code 0} indicates that the first
7872 * elements from each array mismatch.
7873 *
7874 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7875 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7876 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
7877 * if the following expression is true:
7878 * <pre>{@code
7879 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
7880 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
7881 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
7882 * }</pre>
7883 *
7884 * @param a the first array to be tested for a mismatch
7885 * @param aFromIndex the index (inclusive) of the first element in the
7886 * first array to be tested
7887 * @param aToIndex the index (exclusive) of the last element in the
7888 * first array to be tested
7889 * @param b the second array to be tested for a mismatch
7890 * @param bFromIndex the index (inclusive) of the first element in the
7891 * second array to be tested
7892 * @param bToIndex the index (exclusive) of the last element in the
7893 * second array to be tested
7894 * @return the relative index of the first mismatch between the two arrays
7895 * over the specified ranges, otherwise {@code -1}.
7896 * @throws IllegalArgumentException
7897 * if {@code aFromIndex > aToIndex} or
7984 * it follows that the relative index is only valid for the array with the
7985 * larger range.
7986 * Otherwise, there is no mismatch.
7987 *
7988 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7989 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7990 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7991 * prefix of length {@code pl} if the following expression is true:
7992 * <pre>{@code
7993 * pl >= 0 &&
7994 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7995 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7996 * a[aFromIndex + pl] != b[bFromIndex + pl]
7997 * }</pre>
7998 * Note that a common prefix length of {@code 0} indicates that the first
7999 * elements from each array mismatch.
8000 *
8001 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8002 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8003 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8004 * if the following expression is true:
8005 * <pre>{@code
8006 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8007 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8008 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8009 * }</pre>
8010 *
8011 * @param a the first array to be tested for a mismatch
8012 * @param aFromIndex the index (inclusive) of the first element in the
8013 * first array to be tested
8014 * @param aToIndex the index (exclusive) of the last element in the
8015 * first array to be tested
8016 * @param b the second array to be tested for a mismatch
8017 * @param bFromIndex the index (inclusive) of the first element in the
8018 * second array to be tested
8019 * @param bToIndex the index (exclusive) of the last element in the
8020 * second array to be tested
8021 * @return the relative index of the first mismatch between the two arrays
8022 * over the specified ranges, otherwise {@code -1}.
8023 * @throws IllegalArgumentException
8024 * if {@code aFromIndex > aToIndex} or
8111 * it follows that the relative index is only valid for the array with the
8112 * larger range.
8113 * Otherwise, there is no mismatch.
8114 *
8115 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8116 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8117 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8118 * prefix of length {@code pl} if the following expression is true:
8119 * <pre>{@code
8120 * pl >= 0 &&
8121 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8122 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
8123 * a[aFromIndex + pl] != b[bFromIndex + pl]
8124 * }</pre>
8125 * Note that a common prefix length of {@code 0} indicates that the first
8126 * elements from each array mismatch.
8127 *
8128 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8129 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8130 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8131 * if the following expression is true:
8132 * <pre>{@code
8133 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8134 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8135 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8136 * }</pre>
8137 *
8138 * @param a the first array to be tested for a mismatch
8139 * @param aFromIndex the index (inclusive) of the first element in the
8140 * first array to be tested
8141 * @param aToIndex the index (exclusive) of the last element in the
8142 * first array to be tested
8143 * @param b the second array to be tested for a mismatch
8144 * @param bFromIndex the index (inclusive) of the first element in the
8145 * second array to be tested
8146 * @param bToIndex the index (exclusive) of the last element in the
8147 * second array to be tested
8148 * @return the relative index of the first mismatch between the two arrays
8149 * over the specified ranges, otherwise {@code -1}.
8150 * @throws IllegalArgumentException
8151 * if {@code aFromIndex > aToIndex} or
8238 * it follows that the relative index is only valid for the array with the
8239 * larger range.
8240 * Otherwise, there is no mismatch.
8241 *
8242 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8243 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8244 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8245 * prefix of length {@code pl} if the following expression is true:
8246 * <pre>{@code
8247 * pl >= 0 &&
8248 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8249 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
8250 * Float.compare(a[aFromIndex + pl], b[bFromIndex + pl]) != 0
8251 * }</pre>
8252 * Note that a common prefix length of {@code 0} indicates that the first
8253 * elements from each array mismatch.
8254 *
8255 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8256 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8257 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8258 * if the following expression is true:
8259 * <pre>{@code
8260 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8261 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8262 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8263 * }</pre>
8264 *
8265 * @param a the first array to be tested for a mismatch
8266 * @param aFromIndex the index (inclusive) of the first element in the
8267 * first array to be tested
8268 * @param aToIndex the index (exclusive) of the last element in the
8269 * first array to be tested
8270 * @param b the second array to be tested for a mismatch
8271 * @param bFromIndex the index (inclusive) of the first element in the
8272 * second array to be tested
8273 * @param bToIndex the index (exclusive) of the last element in the
8274 * second array to be tested
8275 * @return the relative index of the first mismatch between the two arrays
8276 * over the specified ranges, otherwise {@code -1}.
8277 * @throws IllegalArgumentException
8278 * if {@code aFromIndex > aToIndex} or
8365 * it follows that the relative index is only valid for the array with the
8366 * larger range.
8367 * Otherwise, there is no mismatch.
8368 *
8369 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8370 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8371 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8372 * prefix of length {@code pl} if the following expression is true:
8373 * <pre>{@code
8374 * pl >= 0 &&
8375 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8376 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
8377 * Double.compare(a[aFromIndex + pl], b[bFromIndex + pl]) != 0
8378 * }</pre>
8379 * Note that a common prefix length of {@code 0} indicates that the first
8380 * elements from each array mismatch.
8381 *
8382 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8383 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8384 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8385 * if the following expression is true:
8386 * <pre>{@code
8387 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8388 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8389 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8390 * }</pre>
8391 *
8392 * @param a the first array to be tested for a mismatch
8393 * @param aFromIndex the index (inclusive) of the first element in the
8394 * first array to be tested
8395 * @param aToIndex the index (exclusive) of the last element in the
8396 * first array to be tested
8397 * @param b the second array to be tested for a mismatch
8398 * @param bFromIndex the index (inclusive) of the first element in the
8399 * second array to be tested
8400 * @param bToIndex the index (exclusive) of the last element in the
8401 * second array to be tested
8402 * @return the relative index of the first mismatch between the two arrays
8403 * over the specified ranges, otherwise {@code -1}.
8404 * @throws IllegalArgumentException
8405 * if {@code aFromIndex > aToIndex} or
8496 * it follows that the relative index is only valid for the array with the
8497 * larger range.
8498 * Otherwise, there is no mismatch.
8499 *
8500 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8501 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8502 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8503 * prefix of length {@code pl} if the following expression is true:
8504 * <pre>{@code
8505 * pl >= 0 &&
8506 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8507 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
8508 * !Objects.equals(a[aFromIndex + pl], b[bFromIndex + pl])
8509 * }</pre>
8510 * Note that a common prefix length of {@code 0} indicates that the first
8511 * elements from each array mismatch.
8512 *
8513 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8514 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8515 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8516 * if the following expression is true:
8517 * <pre>{@code
8518 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8519 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8520 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8521 * }</pre>
8522 *
8523 * @param a the first array to be tested for a mismatch
8524 * @param aFromIndex the index (inclusive) of the first element in the
8525 * first array to be tested
8526 * @param aToIndex the index (exclusive) of the last element in the
8527 * first array to be tested
8528 * @param b the second array to be tested for a mismatch
8529 * @param bFromIndex the index (inclusive) of the first element in the
8530 * second array to be tested
8531 * @param bToIndex the index (exclusive) of the last element in the
8532 * second array to be tested
8533 * @return the relative index of the first mismatch between the two arrays
8534 * over the specified ranges, otherwise {@code -1}.
8535 * @throws IllegalArgumentException
8536 * if {@code aFromIndex > aToIndex} or
8642 * it follows that the relative index is only valid for the array with the
8643 * larger range.
8644 * Otherwise, there is no mismatch.
8645 *
8646 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8647 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8648 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8649 * prefix of length {@code pl} if the following expression is true:
8650 * <pre>{@code
8651 * pl >= 0 &&
8652 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8653 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl, cmp) &&
8654 * cmp.compare(a[aFromIndex + pl], b[bFromIndex + pl]) != 0
8655 * }</pre>
8656 * Note that a common prefix length of {@code 0} indicates that the first
8657 * elements from each array mismatch.
8658 *
8659 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8660 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8661 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8662 * if the following expression is true:
8663 * <pre>{@code
8664 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8665 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8666 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8667 * cmp)
8668 * }</pre>
8669 *
8670 * @param a the first array to be tested for a mismatch
8671 * @param aFromIndex the index (inclusive) of the first element in the
8672 * first array to be tested
8673 * @param aToIndex the index (exclusive) of the last element in the
8674 * first array to be tested
8675 * @param b the second array to be tested for a mismatch
8676 * @param bFromIndex the index (inclusive) of the first element in the
8677 * second array to be tested
8678 * @param bToIndex the index (exclusive) of the last element in the
8679 * second array to be tested
8680 * @param cmp the comparator to compare array elements
8681 * @param <T> the type of array elements
8682 * @return the relative index of the first mismatch between the two arrays
|
7476 * it follows that the relative index is only valid for the array with the
7477 * larger range.
7478 * Otherwise, there is no mismatch.
7479 *
7480 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7481 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7482 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7483 * prefix of length {@code pl} if the following expression is true:
7484 * <pre>{@code
7485 * pl >= 0 &&
7486 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7487 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7488 * a[aFromIndex + pl] != b[bFromIndex + pl]
7489 * }</pre>
7490 * Note that a common prefix length of {@code 0} indicates that the first
7491 * elements from each array mismatch.
7492 *
7493 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7494 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7495 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
7496 * prefix if the following expression is true:
7497 * <pre>{@code
7498 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
7499 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
7500 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
7501 * }</pre>
7502 *
7503 * @param a the first array to be tested for a mismatch
7504 * @param aFromIndex the index (inclusive) of the first element in the
7505 * first array to be tested
7506 * @param aToIndex the index (exclusive) of the last element in the
7507 * first array to be tested
7508 * @param b the second array to be tested for a mismatch
7509 * @param bFromIndex the index (inclusive) of the first element in the
7510 * second array to be tested
7511 * @param bToIndex the index (exclusive) of the last element in the
7512 * second array to be tested
7513 * @return the relative index of the first mismatch between the two arrays
7514 * over the specified ranges, otherwise {@code -1}.
7515 * @throws IllegalArgumentException
7516 * if {@code aFromIndex > aToIndex} or
7603 * it follows that the relative index is only valid for the array with the
7604 * larger range.
7605 * Otherwise, there is no mismatch.
7606 *
7607 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7608 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7609 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7610 * prefix of length {@code pl} if the following expression is true:
7611 * <pre>{@code
7612 * pl >= 0 &&
7613 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7614 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7615 * a[aFromIndex + pl] != b[bFromIndex + pl]
7616 * }</pre>
7617 * Note that a common prefix length of {@code 0} indicates that the first
7618 * elements from each array mismatch.
7619 *
7620 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7621 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7622 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
7623 * prefix if the following expression is true:
7624 * <pre>{@code
7625 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
7626 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
7627 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
7628 * }</pre>
7629 *
7630 * @param a the first array to be tested for a mismatch
7631 * @param aFromIndex the index (inclusive) of the first element in the
7632 * first array to be tested
7633 * @param aToIndex the index (exclusive) of the last element in the
7634 * first array to be tested
7635 * @param b the second array to be tested for a mismatch
7636 * @param bFromIndex the index (inclusive) of the first element in the
7637 * second array to be tested
7638 * @param bToIndex the index (exclusive) of the last element in the
7639 * second array to be tested
7640 * @return the relative index of the first mismatch between the two arrays
7641 * over the specified ranges, otherwise {@code -1}.
7642 * @throws IllegalArgumentException
7643 * if {@code aFromIndex > aToIndex} or
7730 * it follows that the relative index is only valid for the array with the
7731 * larger range.
7732 * Otherwise, there is no mismatch.
7733 *
7734 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7735 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7736 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7737 * prefix of length {@code pl} if the following expression is true:
7738 * <pre>{@code
7739 * pl >= 0 &&
7740 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7741 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7742 * a[aFromIndex + pl] != b[bFromIndex + pl]
7743 * }</pre>
7744 * Note that a common prefix length of {@code 0} indicates that the first
7745 * elements from each array mismatch.
7746 *
7747 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7748 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7749 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
7750 * prefix if the following expression is true:
7751 * <pre>{@code
7752 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
7753 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
7754 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
7755 * }</pre>
7756 *
7757 * @param a the first array to be tested for a mismatch
7758 * @param aFromIndex the index (inclusive) of the first element in the
7759 * first array to be tested
7760 * @param aToIndex the index (exclusive) of the last element in the
7761 * first array to be tested
7762 * @param b the second array to be tested for a mismatch
7763 * @param bFromIndex the index (inclusive) of the first element in the
7764 * second array to be tested
7765 * @param bToIndex the index (exclusive) of the last element in the
7766 * second array to be tested
7767 * @return the relative index of the first mismatch between the two arrays
7768 * over the specified ranges, otherwise {@code -1}.
7769 * @throws IllegalArgumentException
7770 * if {@code aFromIndex > aToIndex} or
7857 * it follows that the relative index is only valid for the array with the
7858 * larger range.
7859 * Otherwise, there is no mismatch.
7860 *
7861 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7862 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7863 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7864 * prefix of length {@code pl} if the following expression is true:
7865 * <pre>{@code
7866 * pl >= 0 &&
7867 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7868 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7869 * a[aFromIndex + pl] != b[bFromIndex + pl]
7870 * }</pre>
7871 * Note that a common prefix length of {@code 0} indicates that the first
7872 * elements from each array mismatch.
7873 *
7874 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7875 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7876 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
7877 * prefix if the following expression is true:
7878 * <pre>{@code
7879 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
7880 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
7881 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
7882 * }</pre>
7883 *
7884 * @param a the first array to be tested for a mismatch
7885 * @param aFromIndex the index (inclusive) of the first element in the
7886 * first array to be tested
7887 * @param aToIndex the index (exclusive) of the last element in the
7888 * first array to be tested
7889 * @param b the second array to be tested for a mismatch
7890 * @param bFromIndex the index (inclusive) of the first element in the
7891 * second array to be tested
7892 * @param bToIndex the index (exclusive) of the last element in the
7893 * second array to be tested
7894 * @return the relative index of the first mismatch between the two arrays
7895 * over the specified ranges, otherwise {@code -1}.
7896 * @throws IllegalArgumentException
7897 * if {@code aFromIndex > aToIndex} or
7984 * it follows that the relative index is only valid for the array with the
7985 * larger range.
7986 * Otherwise, there is no mismatch.
7987 *
7988 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
7989 * ranges [{@code aFromIndex}, {@code atoIndex}) and
7990 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
7991 * prefix of length {@code pl} if the following expression is true:
7992 * <pre>{@code
7993 * pl >= 0 &&
7994 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
7995 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
7996 * a[aFromIndex + pl] != b[bFromIndex + pl]
7997 * }</pre>
7998 * Note that a common prefix length of {@code 0} indicates that the first
7999 * elements from each array mismatch.
8000 *
8001 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8002 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8003 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8004 * prefix if the following expression is true:
8005 * <pre>{@code
8006 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8007 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8008 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8009 * }</pre>
8010 *
8011 * @param a the first array to be tested for a mismatch
8012 * @param aFromIndex the index (inclusive) of the first element in the
8013 * first array to be tested
8014 * @param aToIndex the index (exclusive) of the last element in the
8015 * first array to be tested
8016 * @param b the second array to be tested for a mismatch
8017 * @param bFromIndex the index (inclusive) of the first element in the
8018 * second array to be tested
8019 * @param bToIndex the index (exclusive) of the last element in the
8020 * second array to be tested
8021 * @return the relative index of the first mismatch between the two arrays
8022 * over the specified ranges, otherwise {@code -1}.
8023 * @throws IllegalArgumentException
8024 * if {@code aFromIndex > aToIndex} or
8111 * it follows that the relative index is only valid for the array with the
8112 * larger range.
8113 * Otherwise, there is no mismatch.
8114 *
8115 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8116 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8117 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8118 * prefix of length {@code pl} if the following expression is true:
8119 * <pre>{@code
8120 * pl >= 0 &&
8121 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8122 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
8123 * a[aFromIndex + pl] != b[bFromIndex + pl]
8124 * }</pre>
8125 * Note that a common prefix length of {@code 0} indicates that the first
8126 * elements from each array mismatch.
8127 *
8128 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8129 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8130 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8131 * prefix if the following expression is true:
8132 * <pre>{@code
8133 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8134 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8135 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8136 * }</pre>
8137 *
8138 * @param a the first array to be tested for a mismatch
8139 * @param aFromIndex the index (inclusive) of the first element in the
8140 * first array to be tested
8141 * @param aToIndex the index (exclusive) of the last element in the
8142 * first array to be tested
8143 * @param b the second array to be tested for a mismatch
8144 * @param bFromIndex the index (inclusive) of the first element in the
8145 * second array to be tested
8146 * @param bToIndex the index (exclusive) of the last element in the
8147 * second array to be tested
8148 * @return the relative index of the first mismatch between the two arrays
8149 * over the specified ranges, otherwise {@code -1}.
8150 * @throws IllegalArgumentException
8151 * if {@code aFromIndex > aToIndex} or
8238 * it follows that the relative index is only valid for the array with the
8239 * larger range.
8240 * Otherwise, there is no mismatch.
8241 *
8242 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8243 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8244 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8245 * prefix of length {@code pl} if the following expression is true:
8246 * <pre>{@code
8247 * pl >= 0 &&
8248 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8249 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
8250 * Float.compare(a[aFromIndex + pl], b[bFromIndex + pl]) != 0
8251 * }</pre>
8252 * Note that a common prefix length of {@code 0} indicates that the first
8253 * elements from each array mismatch.
8254 *
8255 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8256 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8257 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8258 * prefix if the following expression is true:
8259 * <pre>{@code
8260 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8261 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8262 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8263 * }</pre>
8264 *
8265 * @param a the first array to be tested for a mismatch
8266 * @param aFromIndex the index (inclusive) of the first element in the
8267 * first array to be tested
8268 * @param aToIndex the index (exclusive) of the last element in the
8269 * first array to be tested
8270 * @param b the second array to be tested for a mismatch
8271 * @param bFromIndex the index (inclusive) of the first element in the
8272 * second array to be tested
8273 * @param bToIndex the index (exclusive) of the last element in the
8274 * second array to be tested
8275 * @return the relative index of the first mismatch between the two arrays
8276 * over the specified ranges, otherwise {@code -1}.
8277 * @throws IllegalArgumentException
8278 * if {@code aFromIndex > aToIndex} or
8365 * it follows that the relative index is only valid for the array with the
8366 * larger range.
8367 * Otherwise, there is no mismatch.
8368 *
8369 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8370 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8371 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8372 * prefix of length {@code pl} if the following expression is true:
8373 * <pre>{@code
8374 * pl >= 0 &&
8375 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8376 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
8377 * Double.compare(a[aFromIndex + pl], b[bFromIndex + pl]) != 0
8378 * }</pre>
8379 * Note that a common prefix length of {@code 0} indicates that the first
8380 * elements from each array mismatch.
8381 *
8382 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8383 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8384 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8385 * prefix if the following expression is true:
8386 * <pre>{@code
8387 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8388 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8389 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8390 * }</pre>
8391 *
8392 * @param a the first array to be tested for a mismatch
8393 * @param aFromIndex the index (inclusive) of the first element in the
8394 * first array to be tested
8395 * @param aToIndex the index (exclusive) of the last element in the
8396 * first array to be tested
8397 * @param b the second array to be tested for a mismatch
8398 * @param bFromIndex the index (inclusive) of the first element in the
8399 * second array to be tested
8400 * @param bToIndex the index (exclusive) of the last element in the
8401 * second array to be tested
8402 * @return the relative index of the first mismatch between the two arrays
8403 * over the specified ranges, otherwise {@code -1}.
8404 * @throws IllegalArgumentException
8405 * if {@code aFromIndex > aToIndex} or
8496 * it follows that the relative index is only valid for the array with the
8497 * larger range.
8498 * Otherwise, there is no mismatch.
8499 *
8500 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8501 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8502 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8503 * prefix of length {@code pl} if the following expression is true:
8504 * <pre>{@code
8505 * pl >= 0 &&
8506 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8507 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl) &&
8508 * !Objects.equals(a[aFromIndex + pl], b[bFromIndex + pl])
8509 * }</pre>
8510 * Note that a common prefix length of {@code 0} indicates that the first
8511 * elements from each array mismatch.
8512 *
8513 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8514 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8515 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8516 * prefix if the following expression is true:
8517 * <pre>{@code
8518 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8519 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8520 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex))
8521 * }</pre>
8522 *
8523 * @param a the first array to be tested for a mismatch
8524 * @param aFromIndex the index (inclusive) of the first element in the
8525 * first array to be tested
8526 * @param aToIndex the index (exclusive) of the last element in the
8527 * first array to be tested
8528 * @param b the second array to be tested for a mismatch
8529 * @param bFromIndex the index (inclusive) of the first element in the
8530 * second array to be tested
8531 * @param bToIndex the index (exclusive) of the last element in the
8532 * second array to be tested
8533 * @return the relative index of the first mismatch between the two arrays
8534 * over the specified ranges, otherwise {@code -1}.
8535 * @throws IllegalArgumentException
8536 * if {@code aFromIndex > aToIndex} or
8642 * it follows that the relative index is only valid for the array with the
8643 * larger range.
8644 * Otherwise, there is no mismatch.
8645 *
8646 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8647 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8648 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a common
8649 * prefix of length {@code pl} if the following expression is true:
8650 * <pre>{@code
8651 * pl >= 0 &&
8652 * pl < Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex) &&
8653 * Arrays.equals(a, aFromIndex, aFromIndex + pl, b, bFromIndex, bFromIndex + pl, cmp) &&
8654 * cmp.compare(a[aFromIndex + pl], b[bFromIndex + pl]) != 0
8655 * }</pre>
8656 * Note that a common prefix length of {@code 0} indicates that the first
8657 * elements from each array mismatch.
8658 *
8659 * <p>Two non-{@code null} arrays, {@code a} and {@code b} with specified
8660 * ranges [{@code aFromIndex}, {@code atoIndex}) and
8661 * [{@code bFromIndex}, {@code btoIndex}) respectively, share a proper
8662 * prefix if the following expression is true:
8663 * <pre>{@code
8664 * (aToIndex - aFromIndex) != (bToIndex - bFromIndex) &&
8665 * Arrays.equals(a, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8666 * b, 0, Math.min(aToIndex - aFromIndex, bToIndex - bFromIndex),
8667 * cmp)
8668 * }</pre>
8669 *
8670 * @param a the first array to be tested for a mismatch
8671 * @param aFromIndex the index (inclusive) of the first element in the
8672 * first array to be tested
8673 * @param aToIndex the index (exclusive) of the last element in the
8674 * first array to be tested
8675 * @param b the second array to be tested for a mismatch
8676 * @param bFromIndex the index (inclusive) of the first element in the
8677 * second array to be tested
8678 * @param bToIndex the index (exclusive) of the last element in the
8679 * second array to be tested
8680 * @param cmp the comparator to compare array elements
8681 * @param <T> the type of array elements
8682 * @return the relative index of the first mismatch between the two arrays
|