-
public final class CollectionUtils
-
-
Method Summary
Modifier and Type Method Description static <T> Set<T>tryMakeImmutableSet(Collection<T> input)Converts the input to an immutable set if available on the current platform. static <T> List<T>tryMakeImmutableList(Collection<T> input)Converts the input to an immutable list if available on the current platform. static <K, V> Map<K, V>tryMakeImmutableMap(Map<K, V> input)Converts the input to an immutable map if available on the current platform. -
-
Method Detail
-
tryMakeImmutableSet
static <T> Set<T> tryMakeImmutableSet(Collection<T> input)
Converts the input to an immutable set if available on the current platform. Otherwise returnsthe input as a set.
- Parameters:
input- the input.
-
tryMakeImmutableList
static <T> List<T> tryMakeImmutableList(Collection<T> input)
Converts the input to an immutable list if available on the current platform. Otherwise returnsthe input as a list.
- Parameters:
input- the input.
-
-
-
-