Class ArrayUtilRt

java.lang.Object
com.intellij.util.ArrayUtilRt

public final class ArrayUtilRt extends Object
A stripped-down version of ArrayUtil. Intended to use by external (out-of-IDE-process) runners and helpers so it should not contain any library dependencies.
  • Field Details

    • EMPTY_SHORT_ARRAY

      public static final short[] EMPTY_SHORT_ARRAY
    • EMPTY_CHAR_ARRAY

      public static final char[] EMPTY_CHAR_ARRAY
    • EMPTY_BYTE_ARRAY

      public static final byte[] EMPTY_BYTE_ARRAY
    • EMPTY_INT_ARRAY

      public static final int[] EMPTY_INT_ARRAY
    • EMPTY_BOOLEAN_ARRAY

      public static final boolean[] EMPTY_BOOLEAN_ARRAY
    • EMPTY_OBJECT_ARRAY

      public static final Object[] EMPTY_OBJECT_ARRAY
    • EMPTY_STRING_ARRAY

      public static final String[] EMPTY_STRING_ARRAY
    • EMPTY_LONG_ARRAY

      public static final long[] EMPTY_LONG_ARRAY
  • Constructor Details

    • ArrayUtilRt

      public ArrayUtilRt()
  • Method Details

    • toStringArray

      @NotNull @Contract(pure=true) public static @NotNull String[] toStringArray(@Nullable @Nullable Collection<String> collection)
    • find

      @Contract(pure=true) public static <T> int find(@NotNull @NotNull T[] src, @Nullable T obj)
      Parameters:
      src - source array.
      obj - object to be found.
      Returns:
      index of obj in the src array. Returns -1 if passed object isn't found. This method uses equals of arrays elements to compare obj with these elements.
    • indexOf

      @Contract(pure=true) public static <T> int indexOf(@NotNull @NotNull T[] src, @Nullable T obj, int start, int end)