Class WeightedStrings
- java.lang.Object
-
- io.virtdata.libbasics.shared.from_long.to_string.WeightedStrings
-
- All Implemented Interfaces:
java.util.function.LongFunction<java.lang.String>
public class WeightedStrings extends java.lang.Object implements java.util.function.LongFunction<java.lang.String>Allows for weighted elements to be used, such asa:0.25;b:0.25;c:0.5ora:1;b:1.0;c:2.0The unit weights are normalized to the cumulative sum internally, so it is not necessary for them to add up to any particular value.
-
-
Constructor Summary
Constructors Constructor Description WeightedStrings(java.lang.String valuesAndWeights)
-
Method Summary
Modifier and Type Method Description java.lang.Stringapply(long value)
-