|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.fgov.ehealth.etee.crypto.utils.Iterables
public final class Iterables
A utility class to work easily with instances of Iterable. This class consists of factory methods that allow creation
of a new Collection. These methods will infer the type of the collection.
| Method Summary | ||
|---|---|---|
static
|
first(java.lang.Iterable<T> iterable)
Retrieve the first item from an Iterable. |
|
static
|
newImmutableList(java.util.List<? extends T> list)
Create a new immutable instance of List preloaded with a given list of items. |
|
static
|
newImmutableList(T... items)
Create a new immutable instance of List loaded with a dynamic list of items. |
|
static
|
newList()
Create a new instance of List. |
|
static
|
newList(T... items)
Create a new instance of List preloaded with a dynamic list of items. |
|
static
|
newSet()
Creates a new instance of Set. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> java.util.List<T> newList()
List. This method will return a new ArrayList.
Listpublic static <T> java.util.List<T> newList(T... items)
List preloaded with a dynamic list of items. This method will return a new
ArrayList.
items - A dynamic list of items that needs to be added to the list.
List preloaded with the given items.public static <T> java.util.List<T> newImmutableList(java.util.List<? extends T> list)
List preloaded with a given list of items.
list - An instance of List that contains items that need to be added to the immutable list.
List.public static <T> java.util.List<T> newImmutableList(T... items)
List loaded with a dynamic list of items. These items shouldn't be null
or this method will throw an IllegalArgumentException.
items - A dynamic list of items that should be loaded in the immutable list.
Listpublic static <T> java.util.Set<T> newSet()
Set. This method will return a new instance of HashSet.
Setpublic static <T> T first(java.lang.Iterable<T> iterable)
Iterable.
iterable - The iterable to retrieve the first item from.
Iterable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||