Class ContainerUtil

java.lang.Object
com.intellij.util.containers.ContainerUtil

public class ContainerUtil extends Object
  • Constructor Details

    • ContainerUtil

      public ContainerUtil()
  • Method Details

    • ar

      @SafeVarargs @NotNull @Contract(pure=true) public static <T> @NotNull T[] ar(@NotNull @NotNull T... elements)
    • newHashMap

      @NotNull @Contract(pure=true) public static <K, V> @NotNull HashMap<K,V> newHashMap()
    • newHashMap

      @NotNull @Contract(pure=true) public static <K, V> @NotNull HashMap<K,V> newHashMap(@NotNull @NotNull Map<? extends K,? extends V> map)
    • newArrayList

      @NotNull @Contract(pure=true) public static <T> @NotNull ArrayList<T> newArrayList()
    • newArrayList

      @NotNull @Contract(pure=true) public static <E> @NotNull ArrayList<E> newArrayList(@NotNull @NotNull Iterable<? extends E> iterable)
    • newArrayList

      @NotNull @Contract(pure=true) public static <T> @NotNull List<T> newArrayList(@NotNull @NotNull T[] elements, int start, int end)
    • newHashSet

      @NotNull @Contract(pure=true) public static <T> @NotNull HashSet<T> newHashSet()
    • newConcurrentSet

      @NotNull @Contract(pure=true) public static <T> @NotNull Set<T> newConcurrentSet()
    • newConcurrentMap

      @NotNull @Contract(pure=true) public static <K, V> @NotNull ConcurrentMap<K,V> newConcurrentMap()
    • map2Array

      @NotNull @Contract(pure=true) public static <T, V> @NotNull V[] map2Array(@NotNull @NotNull T[] array, @NotNull @NotNull Class<V> aClass, @NotNull @NotNull Function<? super T,? extends V> mapper)
    • getLastItem

      @Contract(pure=true) public static <T> T getLastItem(@Nullable @Nullable List<? extends T> list, @Nullable T def)
    • getLastItem

      @Contract(pure=true) public static <T> T getLastItem(@Nullable @Nullable List<? extends T> list)
    • isEmpty

      @Contract(value="null -> true", pure=true) public static <T> boolean isEmpty(@Nullable @Nullable Collection<? extends T> collection)
    • sorted

      @NotNull @Contract(pure=true) public static <T> @NotNull List<T> sorted(@NotNull @NotNull Collection<? extends T> list, @NotNull @NotNull Comparator<? super T> comparator)
    • sorted

      @NotNull @Contract(pure=true) public static <T> @NotNull List<T> sorted(@NotNull @NotNull Iterable<? extends T> list, @NotNull @NotNull Comparator<? super T> comparator)
    • sorted

      @NotNull @Contract(pure=true) public static <T extends Comparable<? super T>> @NotNull List<T> sorted(@NotNull @NotNull Collection<? extends T> list)
    • sort

      public static <T> void sort(@NotNull @NotNull List<T> list, @NotNull @NotNull Comparator<? super T> comparator)
    • sort

      public static <T> void sort(@NotNull @NotNull T[] a, @NotNull @NotNull Comparator<? super T> comparator)
    • createLockFreeCopyOnWriteList

      @NotNull @Contract(value=" -> new", pure=true) public static <T> @NotNull List<T> createLockFreeCopyOnWriteList()
    • addIfNotNull

      public static <T> void addIfNotNull(@NotNull @NotNull Collection<? super T> result, @Nullable T element)
    • immutableSet

      @SafeVarargs @NotNull @Contract(pure=true) public static <E> @NotNull Set<E> immutableSet(@NotNull @NotNull E... elements)