Class ArrayUtils

java.lang.Object
org.apache.dubbo.common.utils.ArrayUtils

public final class ArrayUtils extends Object
Contains some methods to check array.
  • Method Details

    • isEmpty

      public static boolean isEmpty(Object[] array)

      Checks if the array is null or empty.

      Parameters:
      array - th array to check
      Returns:
      true if the array is null or empty.
    • isNotEmpty

      public static boolean isNotEmpty(Object[] array)

      Checks if the array is not null or empty.

      Parameters:
      array - th array to check
      Returns:
      true if the array is not null or empty.
    • contains

      public static boolean contains(String[] array, String valueToFind)
    • indexOf

      public static int indexOf(String[] array, String valueToFind, int startIndex)
    • of

      public static <T> T[] of(T... values)
      Convert from variable arguments to array
      Type Parameters:
      T - The class
      Parameters:
      values - variable arguments
      Returns:
      array
      Since:
      2.7.9
    • first

      public static <T> T first(T[] data)