Package org.jivesoftware.smack.util
Class CollectionUtil
- java.lang.Object
-
- org.jivesoftware.smack.util.CollectionUtil
-
public class CollectionUtil extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CollectionUtil.Predicate<T>
-
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)
-
-
-
Constructor Detail
-
CollectionUtil
public CollectionUtil()
-
-
Method Detail
-
requireNotEmpty
public static <T> java.util.Collection<T> requireNotEmpty(java.util.Collection<T> collection, java.lang.String collectionName)
-
removeUntil
public static <T,C extends java.util.Collection<T>> java.util.List<T> removeUntil(C collection, CollectionUtil.Predicate<T> predicate)
-
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)
-
emptyOrSingletonListFrom
public static <T> java.util.List<T> emptyOrSingletonListFrom(T element)
-
-