| Package | Description |
|---|---|
| me.lucko.helper.random |
| Modifier and Type | Method and Description |
|---|---|
static <E> RandomSelector<E> |
RandomSelector.uniform(Collection<E> elements)
Creates a uniform selector which picks elements randomly.
|
static <E extends Weighted> |
RandomSelector.weighted(Collection<E> elements)
Creates a weighted selector which picks elements according to the value of their
Weighted.getWeight(). |
static <E> RandomSelector<E> |
RandomSelector.weighted(Collection<E> elements,
Weigher<? super E> weigher)
Creates a weighted selector which picks elements using their weight,
according to the weigher function.
|
Copyright © 2022. All rights reserved.