类 ArrayUtils


  • public final class ArrayUtils
    extends Object
    Contains some methods to check array.
    • 方法详细资料

      • isEmpty

        public static boolean isEmpty​(Object[] array)

        Checks if the array is null or empty.

        参数:
        array - th array to check
        返回:
        true if the array is null or empty.
      • isNotEmpty

        public static boolean isNotEmpty​(Object[] array)

        Checks if the array is not null or empty.

        参数:
        array - th array to check
        返回:
        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
        类型参数:
        T - The class
        参数:
        values - variable arguments
        返回:
        array
        从以下版本开始:
        2.7.9