Class CollectionUtil


  • public final class CollectionUtil
    extends Object
    • Method Detail

      • treeSet

        public static <T> TreeSet<T> treeSet​(T... items)
      • toMapWithStringKeys

        public static <K,​V> void toMapWithStringKeys​(Map<Class<? extends K>,​V> map,
                                                           Map<String,​V> mapAsStrings)
      • toMapWithStringKeys

        public static <K,​V> Map<String,​V> toMapWithStringKeys​(Map<Class<? extends K>,​V> map)
      • containsAny

        public static boolean containsAny​(Collection collection,
                                          Object... objects)
      • anyMissing

        public static boolean anyMissing​(Collection collection,
                                         Object... objects)
      • distinct

        public static <T> boolean distinct​(Collection<T> collection)
        Determine whether all of the items in the given Collection are unique.
        Type Parameters:
        T - the type of object contained in the collection
        Parameters:
        collection - the collection to check
        Returns:
        true if all the items in the Collection are unique (as determined by Object.equals(Object), otherwise false