// Path: src/main/java/io/smartcat/ranger/distribution/UniformDistribution.java
// public class UniformDistribution implements Distribution {
// 
//     private Random random = new Random();
// 
//     @Override
//     public int nextInt(int bound) {
//         return random.nextInt(bound);
//     }
// 
//     @Override
//     public int nextInt(int lower, int upper) {
//         return random.ints(1, lower, upper).findFirst().getAsInt();
//     }
// 
//     @Override
//     public long nextLong(long bound) {
//         return random.longs(1, 0, bound).findFirst().getAsLong();
//     }
// 
//     @Override
//     public long nextLong(long lower, long upper) {
//         return random.longs(1, lower, upper).findFirst().getAsLong();
//     }
// 
//     @Override
//     public double nextDouble(double lower, double upper) {
//         return random.doubles(1, lower, upper).findFirst().getAsDouble();
//     }
// 
//     @Override
//     public boolean nextBoolean() {
//         return random.nextBoolean();
//     }
// }


import java.util.ArrayList;
import java.util.List;
import io.smartcat.ranger.distribution.UniformDistribution;
package io.smartcat.ranger.core;



/**
 * Randomly selects one of the provided values using the provided counts as weights and as limit.
 *
 * @param <T> Type this value would evaluate to.
 */
public class ExactWeightedValue<T> extends Value<T> {

    private final UniformDistribution distribution;
    private final List<Long> counts;
    private final List<Long> currentNumberOfValues;
// Path: src/main/java/io/smartcat/ranger/distribution/UniformDistribution.java
// public class UniformDistribution implements Distribution {
// 
//     private Random random = new Random();
// 
//     @Override
//     public int nextInt(int bound) {
//         return random.nextInt(bound);
//     }
// 
//     @Override
//     public int nextInt(int lower, int upper) {
//         return random.ints(1, lower, upper).findFirst().getAsInt();
//     }
// 
//     @Override
//     public long nextLong(long bound) {
//         return random.longs(1, 0, bound).findFirst().getAsLong();
//     }
// 
//     @Override
//     public long nextLong(long lower, long upper) {
//         return random.longs(1, lower, upper).findFirst().getAsLong();
//     }
// 
//     @Override
//     public double nextDouble(double lower, double upper) {
//         return random.doubles(1, lower, upper).findFirst().getAsDouble();
//     }
// 
//     @Override
//     public boolean nextBoolean() {
//         return random.nextBoolean();
//     }
// }


// Path: src/main/java/io/smartcat/ranger/core/ExactWeightedValue.java
import java.util.ArrayList;
import java.util.List;
import io.smartcat.ranger.distribution.UniformDistribution;

package io.smartcat.ranger.core;



/**
 * Randomly selects one of the provided values using the provided counts as weights and as limit.
 *
 * @param <T> Type this value would evaluate to.
 */
public class ExactWeightedValue<T> extends Value<T> {

    private final UniformDistribution distribution;
    private final List<Long> counts;
    private final List<Long> currentNumberOfValues;
    private final List<Value<T>> values;