// Path: generators-core/src/main/java/io/generators/core/Generator.java
// public interface Generator<T> {
// 
//     /**
//      * Returns generated &lt;T&gt;
//      *
//      * @return generated <T>
//      */
//     T next();
// }
// 
// Path: generators-core/src/main/java/io/generators/core/RandomPositiveIntegerGenerator.java
// public class RandomPositiveIntegerGenerator implements Generator<Integer> {
//     private final int from;
//     private final int to;
//     private final Random random = ThreadLocalRandom.current();
// 
//     /**
//      * Creates generator that generates integers between from (inclusive) and to (exclusive).
//      *
//      * @param from inclusive lower bound
//      * @param to   exclusive upper bound
//      * @throws IllegalArgumentException when <code>from</code> is less then zero or <code>to</code> is less then or equal to <code>from</code>
//      */
//     public RandomPositiveIntegerGenerator(int from, int to) {
//         checkArgument(from >= 0, "from must be >= 0");
//         checkArgument(from < to, "from must be < to");
//         this.from = from;
//         this.to = to;
//     }
// 
//     /**
//      * Creates generator that generates integers between from 0 and {@link Integer#MAX_VALUE}.
//      */
//     public RandomPositiveIntegerGenerator() {
//         this(0, Integer.MAX_VALUE);
//     }
// 
//     @Override
//     public Integer next() {
//         return from + random.nextInt(to - from);
//     }
// }


import static java.lang.String.format;
import io.generators.core.Generator;
import io.generators.core.RandomPositiveIntegerGenerator;
package io.generators.core.network;



/**
 * Class generates random valid IPv4 addresses. Currently includes all the types of IP addresses including broadcast,
 * loopback etc in the default generation strategy.
 *
 * @author Saket
 */
public class IPv4Generator implements Generator<String> {

    private static final String IP_ADDRESS_FORMAT = "%s.%s.%s.%s";
    private final Generator<Integer> octetGenerator;

    public IPv4Generator() {
// Path: generators-core/src/main/java/io/generators/core/Generator.java
// public interface Generator<T> {
// 
//     /**
//      * Returns generated &lt;T&gt;
//      *
//      * @return generated <T>
//      */
//     T next();
// }
// 
// Path: generators-core/src/main/java/io/generators/core/RandomPositiveIntegerGenerator.java
// public class RandomPositiveIntegerGenerator implements Generator<Integer> {
//     private final int from;
//     private final int to;
//     private final Random random = ThreadLocalRandom.current();
// 
//     /**
//      * Creates generator that generates integers between from (inclusive) and to (exclusive).
//      *
//      * @param from inclusive lower bound
//      * @param to   exclusive upper bound
//      * @throws IllegalArgumentException when <code>from</code> is less then zero or <code>to</code> is less then or equal to <code>from</code>
//      */
//     public RandomPositiveIntegerGenerator(int from, int to) {
//         checkArgument(from >= 0, "from must be >= 0");
//         checkArgument(from < to, "from must be < to");
//         this.from = from;
//         this.to = to;
//     }
// 
//     /**
//      * Creates generator that generates integers between from 0 and {@link Integer#MAX_VALUE}.
//      */
//     public RandomPositiveIntegerGenerator() {
//         this(0, Integer.MAX_VALUE);
//     }
// 
//     @Override
//     public Integer next() {
//         return from + random.nextInt(to - from);
//     }
// }


// Path: generators-core/src/main/java/io/generators/core/network/IPv4Generator.java
import static java.lang.String.format;
import io.generators.core.Generator;
import io.generators.core.RandomPositiveIntegerGenerator;

package io.generators.core.network;



/**
 * Class generates random valid IPv4 addresses. Currently includes all the types of IP addresses including broadcast,
 * loopback etc in the default generation strategy.
 *
 * @author Saket
 */
public class IPv4Generator implements Generator<String> {

    private static final String IP_ADDRESS_FORMAT = "%s.%s.%s.%s";
    private final Generator<Integer> octetGenerator;

    public IPv4Generator() {
        this(new RandomPositiveIntegerGenerator(0, 256));