// Path: src/main/java/org/neo4j/neode/interfaces/SetNumberOfNodes.java
// public interface SetNumberOfNodes
// {
//     SetRelationshipInfo numberOfTargetNodes( int numberOfNodes );
// 
//     SetRelationshipInfo numberOfTargetNodes( Range numberOfNodes );
// 
//     SetRelationshipInfo numberOfTargetNodes( Range numberOfNodes, ProbabilityDistribution probabilityDistribution );
// }
// 
// Path: src/main/java/org/neo4j/neode/probabilities/ProbabilityDistribution.java
// public abstract class ProbabilityDistribution
// {
//     private static final Random RANDOM_INSTANCE = new Random();
// 
//     public static ProbabilityDistribution flatDistribution()
//     {
//         return new FlatProbabilityDistributionUnique();
//     }
// 
//     public static ProbabilityDistribution normalDistribution()
//     {
//         return new NormalProbabilityDistributionUnique();
//     }
// 
//     private final Random random;
// 
//     protected ProbabilityDistribution()
//     {
//         this.random = RANDOM_INSTANCE;
//     }
// 
//     public abstract List<Integer> generateList( Range sizeRange, Range range );
// 
//     public abstract List<Integer> generateList( int size, Range range );
// 
//     public abstract int generateSingle( Range range );
// 
//     public abstract String description();
// 
//     protected final Random random()
//     {
//         return random;
//     }
// }
// 
// Path: src/main/java/org/neo4j/neode/probabilities/ProbabilityDistribution.java
// public static ProbabilityDistribution flatDistribution()
// {
//     return new FlatProbabilityDistributionUnique();
// }
// 
// Path: src/main/java/org/neo4j/neode/probabilities/ProbabilityDistribution.java
// public static ProbabilityDistribution normalDistribution()
// {
//     return new NormalProbabilityDistributionUnique();
// }


import java.util.Set;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
import org.neo4j.neode.interfaces.SetNumberOfNodes;
import org.neo4j.neode.probabilities.ProbabilityDistribution;
import static org.neo4j.neode.probabilities.ProbabilityDistribution.flatDistribution;
import static org.neo4j.neode.probabilities.ProbabilityDistribution.normalDistribution;

    public static SetNumberOfNodes getOrCreate( NodeSpecification nodeSpecification, int maxNumberOfEntities,
                                                ProbabilityDistribution probabilityDistribution )
    {
        GetOrCreateUniqueNodes targetNodesSource = new GetOrCreateUniqueNodes( nodeSpecification,
                maxNumberOfEntities, probabilityDistribution );
        return new TargetNodesStrategyBuilder( targetNodesSource );
    }

    public static SetNumberOfNodes getOrCreate( NodeSpecification nodeSpecification, int maxNumberOfEntities )
    {
        GetOrCreateUniqueNodes targetNodesSource = new GetOrCreateUniqueNodes( nodeSpecification,
                maxNumberOfEntities, flatDistribution() );
        return new TargetNodesStrategyBuilder( targetNodesSource );
    }

    public static SetNumberOfNodes create( NodeSpecification nodeSpecification )
    {
        CreateUniqueNodes targetNodesSource = new CreateUniqueNodes( nodeSpecification );
        return new TargetNodesStrategyBuilder( targetNodesSource );
    }

    private final TargetNodesSource targetNodesSource;
    private final Range targetNodesRange;
    private final ProbabilityDistribution targetNodesProbabilityDistribution;
    private final RelationshipInfo relationshipInfo;
    private final RelationshipConstraints relationshipConstraints;

    TargetNodesStrategy( TargetNodesSource targetNodesSource,
                         Range targetNodesRange,
// Path: src/main/java/org/neo4j/neode/interfaces/SetNumberOfNodes.java
// public interface SetNumberOfNodes
// {
//     SetRelationshipInfo numberOfTargetNodes( int numberOfNodes );
// 
//     SetRelationshipInfo numberOfTargetNodes( Range numberOfNodes );
// 
//     SetRelationshipInfo numberOfTargetNodes( Range numberOfNodes, ProbabilityDistribution probabilityDistribution );
// }
// 
// Path: src/main/java/org/neo4j/neode/probabilities/ProbabilityDistribution.java
// public abstract class ProbabilityDistribution
// {
//     private static final Random RANDOM_INSTANCE = new Random();
// 
//     public static ProbabilityDistribution flatDistribution()
//     {
//         return new FlatProbabilityDistributionUnique();
//     }
// 
//     public static ProbabilityDistribution normalDistribution()
//     {
//         return new NormalProbabilityDistributionUnique();
//     }
// 
//     private final Random random;
// 
//     protected ProbabilityDistribution()
//     {
//         this.random = RANDOM_INSTANCE;
//     }
// 
//     public abstract List<Integer> generateList( Range sizeRange, Range range );
// 
//     public abstract List<Integer> generateList( int size, Range range );
// 
//     public abstract int generateSingle( Range range );
// 
//     public abstract String description();
// 
//     protected final Random random()
//     {
//         return random;
//     }
// }
// 
// Path: src/main/java/org/neo4j/neode/probabilities/ProbabilityDistribution.java
// public static ProbabilityDistribution flatDistribution()
// {
//     return new FlatProbabilityDistributionUnique();
// }
// 
// Path: src/main/java/org/neo4j/neode/probabilities/ProbabilityDistribution.java
// public static ProbabilityDistribution normalDistribution()
// {
//     return new NormalProbabilityDistributionUnique();
// }


// Path: src/main/java/org/neo4j/neode/TargetNodesStrategy.java
import java.util.Set;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
import org.neo4j.neode.interfaces.SetNumberOfNodes;
import org.neo4j.neode.probabilities.ProbabilityDistribution;
import static org.neo4j.neode.probabilities.ProbabilityDistribution.flatDistribution;
import static org.neo4j.neode.probabilities.ProbabilityDistribution.normalDistribution;


    public static SetNumberOfNodes getOrCreate( NodeSpecification nodeSpecification, int maxNumberOfEntities,
                                                ProbabilityDistribution probabilityDistribution )
    {
        GetOrCreateUniqueNodes targetNodesSource = new GetOrCreateUniqueNodes( nodeSpecification,
                maxNumberOfEntities, probabilityDistribution );
        return new TargetNodesStrategyBuilder( targetNodesSource );
    }

    public static SetNumberOfNodes getOrCreate( NodeSpecification nodeSpecification, int maxNumberOfEntities )
    {
        GetOrCreateUniqueNodes targetNodesSource = new GetOrCreateUniqueNodes( nodeSpecification,
                maxNumberOfEntities, flatDistribution() );
        return new TargetNodesStrategyBuilder( targetNodesSource );
    }

    public static SetNumberOfNodes create( NodeSpecification nodeSpecification )
    {
        CreateUniqueNodes targetNodesSource = new CreateUniqueNodes( nodeSpecification );
        return new TargetNodesStrategyBuilder( targetNodesSource );
    }

    private final TargetNodesSource targetNodesSource;
    private final Range targetNodesRange;
    private final ProbabilityDistribution targetNodesProbabilityDistribution;
    private final RelationshipInfo relationshipInfo;
    private final RelationshipConstraints relationshipConstraints;

    TargetNodesStrategy( TargetNodesSource targetNodesSource,
                         Range targetNodesRange,
                         ProbabilityDistribution targetNodesProbabilityDistribution,