Package org.jivesoftware.smack.util
Class CollectionUtil
java.lang.Object
org.jivesoftware.smack.util.CollectionUtil
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>
cloneAndSeal
(Collection<? extends T> collection) static <K,
V> Map<K, V> cloneAndSeal
(Map<K, V> map) static <T> List<T>
emptyOrSingletonListFrom
(T element) static <T> ArrayList<T>
newListWith
(Collection<? extends T> collection) static <T> Set<T>
newSetWith
(Collection<? extends T> collection) static <T> Set<T>
nullSafeUnmodifiableSet
(Set<T> set) 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 Details
-
CollectionUtil
public CollectionUtil()
-
-
Method Details
-
requireNotEmpty
-
removeUntil
public static <T,C extends Collection<T>> List<T> removeUntil(C collection, CollectionUtil.Predicate<T> predicate) -
newListWith
-
cloneAndSeal
-
cloneAndSeal
-
newSetWith
-
emptyOrSingletonListFrom
-
nullSafeUnmodifiableSet
-