Check if recursion is enabled on a list of IPV4 Addresses in Java