Package com.yubico.internal.util
Class CollectionUtil
java.lang.Object
com.yubico.internal.util.CollectionUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>immutableList(List<T> l) Make an unmodifiable shallow copy of the argument.static <T> List<T>immutableListOrEmpty(List<T> l) Alias ofs == null ? Collections.emptyList() : CollectionUtil.immutableList(s).static <K,V> Map<K, V> immutableMap(Map<K, V> m) Make an unmodifiable shallow copy of the argument.static <T> Set<T>immutableSet(Set<T> s) Make an unmodifiable shallow copy of the argument.static <T> Set<T>immutableSetOrEmpty(Set<T> s) Alias ofs == null ? Collections.emptySet() : CollectionUtil.immutableSet(s).static <T> SortedSet<T>immutableSortedSet(Set<T> s) Make an unmodifiable shallow copy of the argument.
-
Constructor Details
-
CollectionUtil
public CollectionUtil()
-
-
Method Details
-
immutableMap
Make an unmodifiable shallow copy of the argument.- Returns:
- A shallow copy of
mwhich cannot be modified
-
immutableList
Make an unmodifiable shallow copy of the argument.- Returns:
- A shallow copy of
lwhich cannot be modified
-
immutableListOrEmpty
Alias ofs == null ? Collections.emptyList() : CollectionUtil.immutableList(s). -
immutableSet
Make an unmodifiable shallow copy of the argument.- Returns:
- A shallow copy of
swhich cannot be modified
-
immutableSetOrEmpty
Alias ofs == null ? Collections.emptySet() : CollectionUtil.immutableSet(s). -
immutableSortedSet
Make an unmodifiable shallow copy of the argument.- Returns:
- A shallow copy of
swhich cannot be modified
-