@@ -0,0 +1,910 @@
+package com.github.rnowling.bps.datagenerator.generators.transaction;%0A%0Aimport java.util.List;%0A%0Aimport com.github.rnowling.bps.datagenerator.algorithms.samplers.Sampler;%0Aimport com.github.rnowling.bps.datagenerator.datamodels.simulation.Product;%0Aimport com.google.common.collect.ImmutableList;%0Aimport com.google.common.collect.Lists;%0A%0Apublic class TransactionPurchasesSampler implements Sampler%3CList%3CProduct%3E%3E%0A%7B%0A%09final private Sampler%3CProduct%3E purchasesSampler;%0A%09%0A%09%0A%09public TransactionPurchasesSampler(Sampler%3CProduct%3E purchasesSampler)%0A%09%7B%0A%09%09this.purchasesSampler = purchasesSampler;%0A%09%7D%0A%09%0A%09public ImmutableList%3CProduct%3E sample() throws Exception%0A%09%7B%0A%09%09List%3CProduct%3E purchasedProducts = Lists.newArrayList();%0A%09%09%0A%09%09while(true)%0A%09%09%7B%0A%09%09%09Product product = purchasesSampler.sample();%0A%09%09%09if(product == null)%0A%09%09%09%7B%0A%09%09%09%09return ImmutableList.copyOf(purchasedProducts);%0A%09%09%09%7D%0A%09%09%09%0A%09%09%09purchasedProducts.add(product);%0A%09%09%7D%0A%09%7D%0A%09%0A%7D%0A

Add TransactionPurchasesSampler from previous commit