public Iterable<InetAddress> iterableIps() {
        return () -> new Iterator<>() {
            private final BigInteger maxValue = lastAddressInteger();
            private BigInteger current = addressInteger;

            public boolean hasNext() {
                return current.compareTo(maxValue) <= 0;
            }

            public InetAddress next() {
                if (!hasNext()) throw new NoSuchElementException();
                InetAddress inetAddress = bitsToInetAddress(current, addressLength);
                current = current.add(BigInteger.ONE);
                return inetAddress;
            }
        };
    }
@Test
    public void iterableIps() {
        assertEquals(List.of("10.12.14.24", "10.12.14.25", "10.12.14.26", "10.12.14.27", "10.12.14.28", "10.12.14.29", "10.12.14.30", "10.12.14.31"),
                StreamSupport.stream(CidrBlock.fromString("10.12.14.24/29").iterableIps().spliterator(), false)
                        .map(InetAddressUtil::toString)
                        .collect(Collectors.toList()));

        assertEquals(List.of("10.12.14.24"),
                StreamSupport.stream(CidrBlock.fromString("10.12.14.24/32").iterableIps().spliterator(), false)
                        .map(InetAddressUtil::toString)
                        .collect(Collectors.toList()));
    }