Package com.mchange.v2.util
Class CollectionUtils
- java.lang.Object
-
- com.mchange.v2.util.CollectionUtils
-
public final class CollectionUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.SortedSet
EMPTY_SORTED_SET
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
add(java.util.Collection c, java.lang.Object o)
static java.util.Collection
attemptClone(java.util.Collection c)
Attempts to find a public clone() method or a copy constructor, in that order, and calls what it finds.static java.util.Map
attemptClone(java.util.Map m)
Attempts to find a public clone() method or a copy constructor, in that order, and calls what it finds.static boolean
isCollectionsWrapper(java.lang.Class cl)
static boolean
isCollectionsWrapper(java.util.Collection c)
static boolean
isCollectionsWrapper(java.util.Map m)
static boolean
isSynchronizedWrapper(java.lang.Class cl)
static boolean
isSynchronizedWrapper(java.util.Collection c)
static boolean
isSynchronizedWrapper(java.util.Map m)
static boolean
isUnmodifiableWrapper(java.lang.Class cl)
static boolean
isUnmodifiableWrapper(java.util.Collection c)
static boolean
isUnmodifiableWrapper(java.util.Map m)
static java.util.Collection
narrowSynchronizedCollection(java.util.Collection c)
static java.util.Map
narrowSynchronizedMap(java.util.Map m)
static java.util.Collection
narrowUnmodifiableCollection(java.util.Collection c)
static java.util.Map
narrowUnmodifiableMap(java.util.Map m)
static void
remove(java.util.Collection c, java.lang.Object o)
static int
size(java.lang.Object o)
-
-
-
Method Detail
-
isCollectionsWrapper
public static boolean isCollectionsWrapper(java.lang.Class cl)
-
isCollectionsWrapper
public static boolean isCollectionsWrapper(java.util.Collection c)
-
isCollectionsWrapper
public static boolean isCollectionsWrapper(java.util.Map m)
-
isSynchronizedWrapper
public static boolean isSynchronizedWrapper(java.lang.Class cl)
-
isSynchronizedWrapper
public static boolean isSynchronizedWrapper(java.util.Collection c)
-
isSynchronizedWrapper
public static boolean isSynchronizedWrapper(java.util.Map m)
-
isUnmodifiableWrapper
public static boolean isUnmodifiableWrapper(java.lang.Class cl)
-
isUnmodifiableWrapper
public static boolean isUnmodifiableWrapper(java.util.Collection c)
-
isUnmodifiableWrapper
public static boolean isUnmodifiableWrapper(java.util.Map m)
-
narrowUnmodifiableCollection
public static java.util.Collection narrowUnmodifiableCollection(java.util.Collection c)
-
narrowSynchronizedCollection
public static java.util.Collection narrowSynchronizedCollection(java.util.Collection c)
-
narrowUnmodifiableMap
public static java.util.Map narrowUnmodifiableMap(java.util.Map m)
-
narrowSynchronizedMap
public static java.util.Map narrowSynchronizedMap(java.util.Map m)
-
attemptClone
public static java.util.Collection attemptClone(java.util.Collection c) throws java.lang.NoSuchMethodException
Attempts to find a public clone() method or a copy constructor, in that order, and calls what it finds. If neither is available, throws a NoSuchMethodException.- Throws:
java.lang.NoSuchMethodException
-
attemptClone
public static java.util.Map attemptClone(java.util.Map m) throws java.lang.NoSuchMethodException
Attempts to find a public clone() method or a copy constructor, in that order, and calls what it finds. If neither is available, throws a NoSuchMethodException.- Throws:
java.lang.NoSuchMethodException
-
add
public static void add(java.util.Collection c, java.lang.Object o)
-
remove
public static void remove(java.util.Collection c, java.lang.Object o)
-
size
public static int size(java.lang.Object o)
-
-