Armstrong Number Validator Purpose

Validate if a number is an Armstrong Number.

An Armstrong Number is a number


  such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 33 + 73 + 13 = 371.


Strategy


Calculate the remainder and quotient of the candidate value.
While the quotient is greater than 0 and the digit sum is not greater than the candidate value, calculate the new remainder, the new quotient, and add remainder raised by 3 to the digit sum.


Implementation



public class ArmstrongNumberValidatorImpl implements ArmstrongNumberValidator {
    @Override
    public boolean isArmstrong(final long candidate) {
        if (candidate &lt; 0) {
            throw new IllegalArgumentException("candidate value must be non-negative");
        }

        long remainder = candidate % 10;
        long quotient = candidate / 10;
        long digitSum = Math.multiplyExact(Math.multiplyExact(remainder, remainder), remainder);
        while (quotient &gt; 0 &amp;&amp; digitSum &lt;= candidate) {
            remainder = quotient % 10;
            quotient = quotient / 10;
            digitSum += Math.multiplyExact(Math.multiplyExact(remainder, remainder), remainder);
        }

        return (0 == quotient &amp;&amp; digitSum == candidate);

    }
}
Why use multiplyexact?
I'm puzzled why you wrote this:

digitSum += Math.multiplyExact(Math.multiplyExact(remainder, remainder), remainder);


instead of this:
digitSum += remainder * remainder * remainder;

You already know that remainder is a single digit value so computing the cube of it will never overflow.
Extraneous check
Your final return statement could be reduced from this:

return (0 == quotient &amp;&amp; digitSum == candidate);


to this:
return (digitSum == candidate);

Your while loop will only terminate on this condition:
quotient == 0 || digitSum &gt; candidate

which means that when digitSum == candidate, quotient must always be 0.