get Random
Returns a single random element from the set, with selection probability based on weights.
Parameters
random
An optional Random instance to use for selection. Defaults to ThreadLocalRandom.
Throws
if the set is empty.
Returns a single random element from the set, with selection probability based on weights.
An optional Random instance to use for selection. Defaults to ThreadLocalRandom.
if the set is empty.