Class ReflectCollectionUtil

java.lang.Object
pl.matsuo.core.util.ReflectCollectionUtil

public class ReflectCollectionUtil
extends Object
Helper methods for collection operations
  • Constructor Details

    • ReflectCollectionUtil

      public ReflectCollectionUtil()
  • Method Details

    • collect

      public static <E> List<E> collect​(Collection<?> collection, String property)
      Creates new list by collecting value of property property from all elements of collection.
    • toMap

      public static <E,​ F> Map<E,​F> toMap​(Collection<F> collection, String property)
      Create map where keys are values of property from collection elements.