- int exclLastIndex = startingBit + newValues.length;
- if (length < exclLastIndex)
- throw new ArrayIndexOutOfBoundsException(
- String.format("Attempted to input bits from index %d to %d when there are only %d wires.", startingBit,
- exclLastIndex - 1, length));
- if (!Arrays.equals(inputValues, startingBit, exclLastIndex, newValues, 0, newValues.length))
+ // index check covered in equals
+ if (!inputValues.equalsWithOffset(newValues, startingBit))