类 ArrayUtil

java.lang.Object
com.agentsflex.core.util.ArrayUtil

public class ArrayUtil extends Object
  • 构造器概要

    构造器
    限定符
    构造器
    说明
    private
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static <T> T[]
    append(T[] first, T... second)
    可变长参形式数组
    static <T> T[]
    concat(T[] first, T[] second)
    合并两个数组为一个新的数组
    static <T> T[]
    concat(T[] first, T[] second, T[] third, T[]... others)
     
    static <T> boolean
    contains(T[] arrays, T object)
    查看数组中是否包含某一个值
    static <T> boolean
    isEmpty(T[] array)
    判断数组是否为空
    static <T> boolean
    isNotEmpty(T[] array)
    判断数组是否不为空

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

  • 方法详细资料

    • isEmpty

      public static <T> boolean isEmpty(T[] array)
      判断数组是否为空
      类型参数:
      T - 数组类型
      参数:
      array - 数组
      返回:
      true 数组为空,false 数组不为空
    • isNotEmpty

      public static <T> boolean isNotEmpty(T[] array)
      判断数组是否不为空
      类型参数:
      T - 数组类型
      参数:
      array - 数组
      返回:
      true 数组不为空,false 数组为空
    • concat

      public static <T> T[] concat(T[] first, T[] second)
      合并两个数组为一个新的数组
      类型参数:
      T -
      参数:
      first - 第一个数组
      second - 第二个数组
      返回:
      新的数组
    • concat

      public static <T> T[] concat(T[] first, T[] second, T[] third, T[]... others)
    • append

      @SafeVarargs public static <T> T[] append(T[] first, T... second)
      可变长参形式数组
      类型参数:
      T -
      参数:
      first - 第一个数组
      second - 第二个数组
      返回:
      新的数组
    • contains

      public static <T> boolean contains(T[] arrays, T object)
      查看数组中是否包含某一个值
      类型参数:
      T -
      参数:
      arrays - 数组
      object - 用于检测的值
      返回:
      true 包含