Package org.jivesoftware.smack.util
Class CollectionUtil
- java.lang.Object
-
- org.jivesoftware.smack.util.CollectionUtil
-
public class CollectionUtil extends 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> List<T>
cloneAndSeal(Collection<? extends T> collection)
static <K,V>
Map<K,V>cloneAndSeal(Map<K,V> map)
static <T> ArrayList<T>
newListWith(Collection<? extends T> collection)
static <T> Set<T>
newSetWith(Collection<? extends T> collection)
static <T,C extends Collection<T>>
List<T>removeUntil(C collection, CollectionUtil.Predicate<T> predicate)
static <T> Collection<T>
requireNotEmpty(Collection<T> collection, String collectionName)
-
-
-
Constructor Detail
-
CollectionUtil
public CollectionUtil()
-
-
Method Detail
-
requireNotEmpty
public static <T> Collection<T> requireNotEmpty(Collection<T> collection, String collectionName)
-
removeUntil
public static <T,C extends Collection<T>> List<T> removeUntil(C collection, CollectionUtil.Predicate<T> predicate)
-
newListWith
public static <T> ArrayList<T> newListWith(Collection<? extends T> collection)
-
cloneAndSeal
public static <T> List<T> cloneAndSeal(Collection<? extends T> collection)
-
cloneAndSeal
public static <K,V> Map<K,V> cloneAndSeal(Map<K,V> map)
-
newSetWith
public static <T> Set<T> newSetWith(Collection<? extends T> collection)
-
-