- if(length < exclLastIndex)
- throw new ArrayIndexOutOfBoundsException("Attempted to input bits from index " + startingBit + " to "
- + exclLastIndex + " when there are only " + length + "wires.");
- if(!Arrays.equals(values, startingBit, exclLastIndex, newValues, 0, newValues.length))
- {
- System.arraycopy(newValues, 0, values, startingBit, newValues.length);
+ if (length < exclLastIndex)
+ throw new ArrayIndexOutOfBoundsException(
+ String.format("Attempted to input bits from index %o to %o when there are only %o wires.", startingBit,
+ exclLastIndex - 1, length));
+ if (!Arrays.equals(inputValues, startingBit, exclLastIndex, newValues, 0, newValues.length)) {
+ System.arraycopy(newValues, 0, inputValues, startingBit, newValues.length);