another example for WeightedLongs

This commit is contained in:
Jonathan Shook 2020-03-28 01:50:11 -05:00
parent 29021a4c38
commit 8a3f35afbb

View File

@ -25,6 +25,7 @@ public class WeightedLongs implements LongFunction<Long> {
private long[] values;
@Example({"WeightedLongs('1:10;3;5;12345;1","Yield 1 62.5% of the time, 3 31.25% of the time, and 12345 6.2% of the time"})
@Example({"WeightedLongs('1,6,7","Yield 1 33.3% of the time, 6 33.3% of the time, and 7 33.3% of the time"})
public WeightedLongs(String valuesAndWeights) {
this.valuesAndWeights = valuesAndWeights;
parseWeights();