|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.trendmicro.grid.acl.ds.DSUtil
public class DSUtil
Utilities to work with the data source api.
Method Summary | ||
---|---|---|
static
|
cast(Collection<? extends E> source,
Class<E> cls)
Shortens casting the given source collection to a collection of the specified class. |
|
static
|
cast(List<? extends E> source,
Class<E> cls)
Shortens casting the given source collection to a collection of the specified class. |
|
static
|
replaceNulls(Collection<E> source,
E with)
Replaces all 'null' entries in the given collection with the specified value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <E> Collection<E> cast(Collection<? extends E> source, Class<E> cls)
E
- the class of the target collections elements.source
- the source to cast.cls
- the class of the target collections elements.
public static <E> List<E> cast(List<? extends E> source, Class<E> cls)
E
- the class of the target collections elements.source
- the source to cast.cls
- the class of the target collections elements.
public static <E> Collection<E> replaceNulls(Collection<E> source, E with)
E
- the type of the list elements.source
- the source list.with
- the replacement of 'null'.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |