|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eobjects.metamodel.util.CollectionUtils
public final class CollectionUtils
Various utility methods for handling of collections and arrays.
| Method Summary | ||
|---|---|---|
static
|
array(E[] existingArray,
E... elements)
Concatenates two arrays |
|
static
|
arrayOf(Class<E> elementClass,
Object arrayOrElement)
|
|
static
|
arrayRemove(E[] array,
E elementToRemove)
|
|
static Object |
arrayRemove(Object array,
Object elementToRemove)
|
|
static
|
concat(boolean removeDuplicates,
Collection<? extends E> firstCollection,
Collection<?>... collections)
|
|
static
|
filter(E[] items,
Predicate<? super E> predicate)
|
|
static
|
filter(Iterable<E> items,
Predicate<? super E> predicate)
|
|
static
|
forEach(E[] items,
Action<? super E> action)
|
|
static
|
forEach(Iterable<E> items,
Action<? super E> action)
|
|
static boolean |
isNullOrEmpty(Collection<?> col)
|
|
static
|
isNullOrEmpty(E[] arr)
|
|
static
|
map(I[] items,
Func<? super I,O> func)
|
|
static
|
map(Iterable<I> items,
Func<? super I,O> func)
|
|
static List<?> |
toList(Object obj)
General purpose list converter method. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <E> E[] array(E[] existingArray,
E... elements)
existingArray - an existing arrayelements - the elements to add to the end of it
public static <E> List<E> concat(boolean removeDuplicates,
Collection<? extends E> firstCollection,
Collection<?>... collections)
public static <E> E[] arrayRemove(E[] array,
E elementToRemove)
public static Object arrayRemove(Object array,
Object elementToRemove)
public static <E> E[] arrayOf(Class<E> elementClass,
Object arrayOrElement)
public static <E> List<E> filter(E[] items,
Predicate<? super E> predicate)
public static <E> List<E> filter(Iterable<E> items,
Predicate<? super E> predicate)
public static <I,O> List<O> map(I[] items,
Func<? super I,O> func)
public static <I,O> List<O> map(Iterable<I> items,
Func<? super I,O> func)
public static <E> void forEach(E[] items,
Action<? super E> action)
public static <E> void forEach(Iterable<E> items,
Action<? super E> action)
public static <E> boolean isNullOrEmpty(E[] arr)
public static boolean isNullOrEmpty(Collection<?> col)
public static List<?> toList(Object obj)
obj - any object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||