public class Lists extends Object
| Constructor and Description |
|---|
Lists() |
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
concat(Collection<T>... elems) |
static <T> List<T> |
filter(Iterable<T> collection,
Predicate<T> condition) |
static <T> List<T> |
filter(T[] array,
Predicate<T> condition) |
static <T> Option<T> |
find(Iterable<T> collection,
Predicate<T> condition) |
static <K,T extends Collection<K>> |
flatten(Collection<T> elem) |
static <T,Z> Z |
foldL(Iterable<T> collection,
Z initialValue,
Function<Tuple2<Z,T>,Z> foldFunction) |
static <T,U> List<U> |
map(Iterable<T> collection,
Function<T,U> transformation) |
static <T,U> List<U> |
map(T[] array,
Function<T,U> transformation) |
static <T> String |
mkString(Iterable<T> collection) |
static <T> String |
mkString(Iterable<T> collection,
String separator) |
static <T> String |
mkString(Iterable<T> collection,
String start,
String end,
String separator) |
static <T> List<T> |
Nil() |
static <T> List<T> |
of(T... elements) |
static <T> List<T> |
take(Iterable<T> input,
int size) |
static <T> List<T> |
takeWhile(Iterable<T> input,
Predicate<T> predicate)
Takes elements from the list as long as the predicate is met and stops after that.
|
public static <T> List<T> Nil()
public static <T> List<T> of(T... elements)
public static <T,Z> Z foldL(Iterable<T> collection, Z initialValue, Function<Tuple2<Z,T>,Z> foldFunction)
public static <K,T extends Collection<K>> List<K> flatten(Collection<T> elem)
public static <T> List<T> concat(Collection<T>... elems)
public static <T> String mkString(Iterable<T> collection, String start, String end, String separator)
Copyright © 2016. All rights reserved.