@@ -0,0 +1,987 @@
+package pl.dzielins42.dmtools.generator.name;%0A%0Aimport pl.dzielins42.dmtools.generator.GeneratorOptions;%0Aimport pl.dzielins42.dmtools.util.ProbabilityDistributionTable;%0A%0Apublic class ProbabilityNameGenerator implements NameGenerator %7B%0A%0A    private ProbabilityDistributionTable%3CNameGenerator%3E elements;%0A%0A    public ProbabilityNameGenerator(ProbabilityDistributionTable%3CNameGenerator%3E elements) %7B%0A        super();%0A%0A        if (elements == null) %7B%0A            throw new IllegalArgumentException();%0A        %7D%0A%0A        this.elements = elements;%0A    %7D%0A%0A    @Override%0A    public long getPossibilitiesCount() %7B%0A        int sum = 0;%0A%0A        NameGenerator%5B%5D generators = elements.getElements();%0A        for (int i = 0; i %3C generators.length; i++) %7B%0A            sum += generators%5Bi%5D.getPossibilitiesCount();%0A        %7D%0A%0A        return sum;%0A    %7D%0A%0A    @Override%0A    public String generate(GeneratorOptions options) %7B%0A        return elements.getRandom(options.getRandom()).generate(options);%0A    %7D%0A%0A%7D%0A

Add ProbabilityNameGenerator which chooses one of its inner NameGenerator instances based on probability distribution.