I would create a new private methods `isWhitespace(char)` so this could look like this:
``` java
if (isWhitespace(value.charAt(i))) {
   whitespace = true;
   continue;
}