commoble.looot.util

## Class RandomHelper

- java.lang.Object
- - commoble.looot.util.RandomHelper

    public class RandomHelper
    extends java.lang.Object

### Constructor Summary

Constructors
Constructor and Description
`RandomHelper()`

### Method Summary

All Methods Static Methods Concrete Methods
`static <T> T` `chooseRandomThing(java.util.Random rand, T... things)`
`static <T> T` `getRandomThingFrom(java.util.Random rand, java.util.List<T> things)`
`static <T> java.util.Optional<T>` `getRandomThingFromMultipleLists(java.util.Random rand, java.util.List<? extends java.util.List<T>> lists)` Returns a random thing from a list of lists of things, weighted appropriate as if it were a single list of things, returns empty optional if all lists are empty

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RandomHelper

    public RandomHelper()

### Method Detail

#### getRandomThingFrom

    @Nullable
    public static <T> T getRandomThingFrom(java.util.Random rand,
                                                      java.util.List<T> things)

#### chooseRandomThing

    @SafeVarargs
     @Nullable
    public static <T> T chooseRandomThing(java.util.Random rand,
                                                                    T... things)

#### getRandomThingFromMultipleLists

    public static <T> java.util.Optional<T> getRandomThingFromMultipleLists(java.util.Random rand,
                                                                            java.util.List<? extends java.util.List<T>> lists)

Returns a random thing from a list of lists of things, weighted appropriate as if it were a single list of things, returns empty optional if all lists are empty

Parameters:
  `rand` -
  `lists` -
Returns: