public class CollectionUtils extends Object
Constructor and Description |
---|
CollectionUtils() |
Modifier and Type | Method and Description |
---|---|
static <T extends BaseResource> |
getFirstItem(List<T> collection)
Fetches first item from the collection
|
static <T extends BaseResource> |
getItemByName(String name,
List<T> collection)
Fetches item from the collection by name
|
public static <T extends BaseResource> T getItemByName(String name, List<T> collection)
name
- item namecollection
- collection to look atpublic static <T extends BaseResource> T getFirstItem(List<T> collection)
collection
- collection to look atCopyright ? 2010 Red Hat, Inc - released under the Apache License Version 2.0