Class CollectionUtil

    • Constructor Summary

      Constructors 
      Constructor Description
      CollectionUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.List<T> cloneAndSeal​(java.util.Collection<? extends T> collection)  
      static <K,​V>
      java.util.Map<K,​V>
      cloneAndSeal​(java.util.Map<K,​V> map)  
      static <T> java.util.List<T> emptyOrSingletonListFrom​(T element)  
      static <T> java.util.ArrayList<T> newListWith​(java.util.Collection<? extends T> collection)  
      static <T> java.util.Set<T> newSetWith​(java.util.Collection<? extends T> collection)  
      static <T,​C extends java.util.Collection<T>>
      java.util.List<T>
      removeUntil​(C collection, CollectionUtil.Predicate<T> predicate)  
      static <T> java.util.Collection<T> requireNotEmpty​(java.util.Collection<T> collection, java.lang.String collectionName)  
      • Methods inherited from class java.lang.Object

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

      • requireNotEmpty

        public static <T> java.util.Collection<T> requireNotEmpty​(java.util.Collection<T> collection,
                                                                  java.lang.String collectionName)
      • newListWith

        public static <T> java.util.ArrayList<T> newListWith​(java.util.Collection<? extends T> collection)
      • cloneAndSeal

        public static <T> java.util.List<T> cloneAndSeal​(java.util.Collection<? extends T> collection)
      • cloneAndSeal

        public static <K,​V> java.util.Map<K,​V> cloneAndSeal​(java.util.Map<K,​V> map)
      • newSetWith

        public static <T> java.util.Set<T> newSetWith​(java.util.Collection<? extends T> collection)