Uses of Interface
me.sciguymjm.uberenchant.api.utils.random.Weighted
-
Uses of Weighted in me.sciguymjm.uberenchant.api.utils.random
Modifier and TypeClassDescriptionclass
A basic class implementing theWeighted
interface for ease of use.Modifier and TypeMethodDescriptionboolean
Add a new possible selection.boolean
Checks if this WeightedChance contains the specified entry or not.Modifier and TypeMethodDescriptionvoid
WeightedChance.addAll
(Collection<? extends Weighted<E>> collection) Adds all the items in the specified collection to this WeightedChancestatic <E> WeightedChance<E>
WeightedChance.fromCollection
(Collection<? extends Weighted<E>> collection) Returns a new instance of a WeightedChance using specified collection
Same as usingWeightedChance(Collection)
boolean
Remove possible selections based on a predicate.static <E> E
WeightedChance.select
(Collection<? extends Weighted<E>> collection) Static method to select a random weighted item from a collectionstatic <E> E
WeightedChance.select
(Random random, Collection<? extends Weighted<E>> collection) Static method to select a random weighted item from a collection using a randomModifierConstructorDescriptionWeightedChance
(Collection<? extends Weighted<E>> collection) Constructs a WeightedChance using the specified collection