Package pl.matsuo.core.util
Class ReflectCollectionUtil
java.lang.Object
pl.matsuo.core.util.ReflectCollectionUtil
public class ReflectCollectionUtil extends Object
Helper methods for collection operations
-
Constructor Summary
Constructors Constructor Description ReflectCollectionUtil() -
Method Summary
Modifier and Type Method Description static <E> List<E>collect(Collection<?> collection, String property)Creates new list by collecting value of propertypropertyfrom all elements ofcollection.static <E, F> Map<E,F>toMap(Collection<F> collection, String property)Create map where keys are values ofpropertyfromcollectionelements.
-
Constructor Details
-
ReflectCollectionUtil
public ReflectCollectionUtil()
-
-
Method Details
-
collect
Creates new list by collecting value of propertypropertyfrom all elements ofcollection. -
toMap
Create map where keys are values ofpropertyfromcollectionelements.
-