Package 

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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
      • tryMakeImmutableMap

         static <K, V> Map<K, V> tryMakeImmutableMap(Map<K, V> input)

        Converts the input to an immutable map if available on the current platform. Otherwise returnsthe input.

        Parameters:
        input - the input.