public final class CollectionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
createEmptyList() |
static <T> List<T> |
createListFromList(Collection<T> collection) |
static <T> T |
getElement(Collection<T> collection,
int index) |
static <T> int |
getIndex(Collection<T> collection,
T element)
Get the index of a element in a collection
|
static <T> T |
getLastElement(Collection<T> collection) |
static <T> void |
replaceValuesInCollection(Collection<T> from,
Collection<T> to) |
public static <T> int getIndex(Collection<T> collection, T element)
collection
- collection to searchelement
- element to search forpublic static <T> T getElement(Collection<T> collection, int index)
public static <T> T getLastElement(Collection<T> collection)
public static <T> List<T> createListFromList(Collection<T> collection)
public static <T> void replaceValuesInCollection(Collection<T> from, Collection<T> to)
public static <T> List<T> createEmptyList()
Copyright © 2015 European Bioinformatics Institute. All Rights Reserved.