org.omnaest.utils.structure.collection.list
Class ListUtil

java.lang.Object
  extended by org.omnaest.utils.structure.collection.list.ListUtil

public class ListUtil
extends Object

Helper class for List.

Author:
Omnaest
See Also:
CollectionUtils

Constructor Summary
ListUtil()
           
 
Method Summary
static
<TO,FROM> List<TO>
convertList(Collection<FROM> listFrom, CollectionUtils.ElementConverter<FROM,TO> elementConverter)
          Converts a given list into a new list with a new element type.
static
<TO,FROM> List<TO>
convertListExcludingNullElements(Collection<FROM> listFrom, CollectionUtils.ElementConverter<FROM,TO> elementConverter)
          Converts a given list into a new list with a new element type, whereby all elements which convert to null will be excluded in the target list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListUtil

public ListUtil()
Method Detail

convertList

public static <TO,FROM> List<TO> convertList(Collection<FROM> listFrom,
                                             CollectionUtils.ElementConverter<FROM,TO> elementConverter)
Converts a given list into a new list with a new element type.

Parameters:
listFrom -
elementConverter -
Returns:

convertListExcludingNullElements

public static <TO,FROM> List<TO> convertListExcludingNullElements(Collection<FROM> listFrom,
                                                                  CollectionUtils.ElementConverter<FROM,TO> elementConverter)
Converts a given list into a new list with a new element type, whereby all elements which convert to null will be excluded in the target list.

Parameters:
listFrom -
elementConverter -
Returns:


Copyright © 2011. All Rights Reserved.