reworked scala IP address example to match the capturing behavior of the new Java example, as a preliminary step for GitHub ticket #8