public class ListUtil
extends java.lang.Object
Constructor and Description |
---|
ListUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> com.google.common.collect.ImmutableList<T> |
list(java.lang.Iterable<T> elems1,
java.lang.Iterable<T> elems2)
Creates an copy immutable copy of given collection with given element prepended.
|
static <T> com.google.common.collect.ImmutableList<T> |
list(T t,
java.lang.Iterable<T> elems)
Creates an copy immutable copy of given collection with given element prepended.
|
static <T> com.google.common.collect.ImmutableList<T> |
list(T t,
T... ts)
Helper for vararg methods with at least one argument.
|
static <T> T |
randomElement(java.util.List<T> list)
Selects a random element from a list.
|
static <T> com.google.common.collect.ImmutableList<T> |
toList(java.lang.Iterable<T> elems)
Converts a Collection to a List.
|
public static <T> com.google.common.collect.ImmutableList<T> list(T t, T... ts)
public static <T> com.google.common.collect.ImmutableList<T> list(T t, java.lang.Iterable<T> elems)
public static <T> com.google.common.collect.ImmutableList<T> list(java.lang.Iterable<T> elems1, java.lang.Iterable<T> elems2)
public static <T> com.google.common.collect.ImmutableList<T> toList(java.lang.Iterable<T> elems)
public static <T> T randomElement(java.util.List<T> list)