Class CollectionUtils


  • public class CollectionUtils
    extends Object
    • Constructor Detail

      • CollectionUtils

        public CollectionUtils()
    • Method Detail

      • makeListMapImmutable

        public static <C,​E> Map<C,​List<E>> makeListMapImmutable​(Map<C,​List<E>> listMap)
        Make a list map immutable.
        Parameters:
        listMap - the list map in input.
        Returns:
        the immutable list map.
      • filterCollectionByType

        public static <T,​E extends T> void filterCollectionByType​(Collection<T> source,
                                                                        Collection<E> destination,
                                                                        Class<E> clazz)
        Copy the source collection into the destination one filtering source elements by the given type.
        Parameters:
        source - the source collection
        destination - the destination collection
        clazz - the filtering type