Class SimpleRandomCollection<E>
java.lang.Object
com.fastasyncworldedit.core.util.collection.RandomCollection<E>
com.fastasyncworldedit.core.util.collection.SimpleRandomCollection<E>
-
Constructor Summary
ConstructorDescriptionSimpleRandomCollection
(Map<E, Double> weights, SimpleRandom random) Create aRandomCollection
from a weighted map and a RNG. -
Method Summary
Methods inherited from class com.fastasyncworldedit.core.util.collection.RandomCollection
getRandom, of, setRandom
-
Constructor Details
-
SimpleRandomCollection
Create aRandomCollection
from a weighted map and a RNG. It is recommended to useRandomCollection.of(Map, SimpleRandom)
instead of this constructor.- Parameters:
weights
- the weighted map.random
- the random number generator.
-
-
Method Details
-
add
-
next
- Specified by:
next
in classRandomCollection<E>
-