public final class RandomPicks extends Object
Constructor and Description |
---|
RandomPicks() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
randomFrom(Random r,
Collection<T> collection)
Pick a random object from the collection.
|
static <T> T |
randomFrom(Random r,
List<T> list)
Pick a random object from the given list.
|
static <T> T |
randomFrom(Random r,
T[] array)
Pick a random object from the given array.
|
public static <T> T randomFrom(Random r, T[] array)
public static <T> T randomFrom(Random r, List<T> list)
public static <T> T randomFrom(Random r, Collection<T> collection)
Copyright © 2011–2015 Carrot Search s.c.. All rights reserved.