Class CollectionUtils


  • public final class CollectionUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T getLastElement​(java.util.List<T> list)  
      static <T> T getSingleElement​(java.lang.Iterable<T> iterable)  
      static <T> T getSingleElement​(java.lang.Iterable<T> iterable, java.util.function.Supplier<? extends java.lang.RuntimeException> exceptionSupplier)  
      static <T extends java.util.Map<K,​?>,​K>
      T
      removeAll​(T map, java.util.Collection<K> keysToRemove)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSingleElement

        public static <T> T getSingleElement​(java.lang.Iterable<T> iterable)
      • getLastElement

        public static <T> T getLastElement​(java.util.List<T> list)
      • getSingleElement

        public static <T> T getSingleElement​(java.lang.Iterable<T> iterable,
                                             java.util.function.Supplier<? extends java.lang.RuntimeException> exceptionSupplier)
      • removeAll

        public static <T extends java.util.Map<K,​?>,​K> T removeAll​(T map,
                                                                               java.util.Collection<K> keysToRemove)