程序包 dev.utils.common

类 ArrayUtils


  • public final class ArrayUtils
    extends java.lang.Object
    detail: Array 数组工具类
    作者:
    Ttt
         // 升序
         Arrays.sort(arrays);
         // 降序 ( 只能对对象数组降序 )
         Arrays.sort(arrays, Collections.reverseOrder());
     
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static java.lang.String appendToString​(boolean[] data)
      追加数组内容字符串
      static java.lang.String appendToString​(byte[] data)
      追加数组内容字符串
      static java.lang.String appendToString​(char[] data)
      追加数组内容字符串
      static java.lang.String appendToString​(double[] data)
      追加数组内容字符串
      static java.lang.String appendToString​(float[] data)
      追加数组内容字符串
      static java.lang.String appendToString​(int[] data)
      追加数组内容字符串
      static java.lang.String appendToString​(long[] data)
      追加数组内容字符串
      static java.lang.String appendToString​(short[] data)
      追加数组内容字符串
      static <T> java.lang.String appendToString​(T[] data)
      追加数组内容字符串
      static boolean[] arrayCopy​(boolean[] prefix, boolean[] suffix)
      拼接数组
      static byte[] arrayCopy​(byte[] prefix, byte[] suffix)
      拼接数组
      static char[] arrayCopy​(char[] prefix, char[] suffix)
      拼接数组
      static double[] arrayCopy​(double[] prefix, double[] suffix)
      拼接数组
      static float[] arrayCopy​(float[] prefix, float[] suffix)
      拼接数组
      static int[] arrayCopy​(int[] prefix, int[] suffix)
      拼接数组
      static long[] arrayCopy​(long[] prefix, long[] suffix)
      拼接数组
      static short[] arrayCopy​(short[] prefix, short[] suffix)
      拼接数组
      static <T> T[] arrayCopy​(T[] prefix, T[] suffix)
      拼接数组
      static java.util.List<java.lang.Boolean> asList​(boolean[] booleans)
      转换数组为集合
      static java.util.List<java.lang.Byte> asList​(byte[] bytes)
      转换数组为集合
      static java.util.List<java.lang.Character> asList​(char[] chars)
      转换数组为集合
      static java.util.List<java.lang.Double> asList​(double[] doubles)
      转换数组为集合
      static java.util.List<java.lang.Float> asList​(float[] floats)
      转换数组为集合
      static java.util.List<java.lang.Integer> asList​(int[] ints)
      转换数组为集合
      static java.util.List<java.lang.Long> asList​(long[] longs)
      转换数组为集合
      static java.util.List<java.lang.Short> asList​(short[] shorts)
      转换数组为集合
      static <T> java.util.List<T> asList​(T[] array)
      转换数组为集合
      static <T> java.util.List<T> asListArgs​(T... array)
      转换数组为集合
      static java.util.List<java.lang.Boolean> asListArgsBoolean​(boolean... booleans)
      转换数组为集合
      static java.util.List<java.lang.Byte> asListArgsByte​(byte... bytes)
      转换数组为集合
      static java.util.List<java.lang.Character> asListArgsChar​(char... chars)
      转换数组为集合
      static java.util.List<java.lang.Double> asListArgsDouble​(double... doubles)
      转换数组为集合
      static java.util.List<java.lang.Float> asListArgsFloat​(float... floats)
      转换数组为集合
      static java.util.List<java.lang.Integer> asListArgsInt​(int... ints)
      转换数组为集合
      static java.util.List<java.lang.Long> asListArgsLong​(long... longs)
      转换数组为集合
      static java.util.List<java.lang.Short> asListArgsShort​(short... shorts)
      转换数组为集合
      static java.lang.Boolean[] booleansToBooleans​(boolean[] booleans)
      boolean[] 转换 Boolean[]
      static boolean[] booleansToBooleans​(java.lang.Boolean[] booleans, boolean defaultValue)
      Boolean[] 转换 boolean[]
      static java.lang.Byte[] bytesToBytes​(byte[] bytes)
      byte[] 转换 Byte[]
      static byte[] bytesToBytes​(java.lang.Byte[] bytes, byte defaultValue)
      Byte[] 转换 byte[]
      static char[] charactersToChars​(java.lang.Character[] characters, char defaultValue)
      Character[] 转换 char[]
      static java.lang.Character[] charsToCharacters​(char[] chars)
      char[] 转换 Character[]
      static java.lang.Double[] doublesToDoubles​(double[] doubles)
      double[] 转换 Double[]
      static double[] doublesToDoubles​(java.lang.Double[] doubles, double defaultValue)
      Double[] 转换 double[]
      static <T> boolean equals​(T value1, T value2)
      判断两个值是否一样
      static java.lang.Float[] floatsToFloats​(float[] floats)
      float[] 转换 Float[]
      static float[] floatsToFloats​(java.lang.Float[] floats, float defaultValue)
      Float[] 转换 float[]
      static boolean get​(boolean[] array, boolean value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static boolean get​(boolean[] booleans, int pos)
      获取数组对应索引数据
      static boolean get​(boolean[] booleans, int pos, boolean defaultValue)
      获取数组对应索引数据
      static byte get​(byte[] array, byte value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static byte get​(byte[] bytes, int pos)
      获取数组对应索引数据
      static byte get​(byte[] bytes, int pos, byte defaultValue)
      获取数组对应索引数据
      static char get​(char[] array, char value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static char get​(char[] chars, int pos)
      获取数组对应索引数据
      static char get​(char[] chars, int pos, char defaultValue)
      获取数组对应索引数据
      static double get​(double[] array, double value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static double get​(double[] doubles, int pos)
      获取数组对应索引数据
      static double get​(double[] doubles, int pos, double defaultValue)
      获取数组对应索引数据
      static float get​(float[] array, float value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static float get​(float[] floats, int pos)
      获取数组对应索引数据
      static float get​(float[] floats, int pos, float defaultValue)
      获取数组对应索引数据
      static int get​(int[] ints, int pos)
      获取数组对应索引数据
      static int get​(int[] ints, int pos, int defaultValue)
      获取数组对应索引数据
      static int get​(int[] array, int value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static long get​(long[] longs, int pos)
      获取数组对应索引数据
      static long get​(long[] longs, int pos, long defaultValue)
      获取数组对应索引数据
      static long get​(long[] array, long value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static short get​(short[] shorts, int pos)
      获取数组对应索引数据
      static short get​(short[] shorts, int pos, short defaultValue)
      获取数组对应索引数据
      static short get​(short[] array, short value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static <T> T get​(T[] array, int pos)
      获取数组对应索引数据
      static <T> T get​(T[] array, int pos, T defaultValue)
      获取数组对应索引数据
      static <T> T get​(T[] array, T value)
      根据指定 value 获取 value 所在位置 + 偏移量的值
      static <T> T get​(T[] array, T value, boolean notNull)
      根据指定 value 获取 value 所在位置 + 偏移量的值
      static <T> T get​(T[] array, T value, int number)
      根据指定 value 获取 value 所在位置 + 偏移量的值
      static <T> T get​(T[] array, T value, int number, boolean notNull)
      根据指定 value 获取 value 所在位置 + 偏移量的值
      static <T> T get​(T[] array, T value, int number, boolean notNull, int offset)
      根据指定值获取 value 所在位置 + 偏移量的值
      static <T> T getByArray​(java.lang.Object array, int pos)
      获取数组对应索引数据
      static <T> T getByArray​(java.lang.Object array, int pos, T defaultValue)
      获取数组对应索引数据
      static int getCount​(java.lang.Object... objects)
      获取数组长度总和
      static boolean getFirst​(boolean[] booleans)
      获取数组第一条数据
      static byte getFirst​(byte[] bytes)
      获取数组第一条数据
      static char getFirst​(char[] chars)
      获取数组第一条数据
      static double getFirst​(double[] doubles)
      获取数组第一条数据
      static float getFirst​(float[] floats)
      获取数组第一条数据
      static int getFirst​(int[] ints)
      获取数组第一条数据
      static long getFirst​(long[] longs)
      获取数组第一条数据
      static short getFirst​(short[] shorts)
      获取数组第一条数据
      static <T> T getFirst​(T[] array)
      获取数组第一条数据
      static boolean getLast​(boolean[] booleans)
      获取数组最后一条数据
      static byte getLast​(byte[] bytes)
      获取数组最后一条数据
      static char getLast​(char[] chars)
      获取数组最后一条数据
      static double getLast​(double[] doubles)
      获取数组最后一条数据
      static float getLast​(float[] floats)
      获取数组最后一条数据
      static int getLast​(int[] ints)
      获取数组最后一条数据
      static long getLast​(long[] longs)
      获取数组最后一条数据
      static short getLast​(short[] shorts)
      获取数组最后一条数据
      static <T> T getLast​(T[] array)
      获取数组最后一条数据
      static double getMaximum​(double[] data)
      获取数组中最大值
      static float getMaximum​(float[] data)
      获取数组中最大值
      static int getMaximum​(int[] data)
      获取数组中最大值
      static long getMaximum​(long[] data)
      获取数组中最大值
      static int getMaximumIndex​(double[] data)
      获取数组中最大值索引
      static int getMaximumIndex​(float[] data)
      获取数组中最大值索引
      static int getMaximumIndex​(int[] data)
      获取数组中最大值索引
      static int getMaximumIndex​(long[] data)
      获取数组中最大值索引
      static double getMinimum​(double[] data)
      获取数组中最小值
      static float getMinimum​(float[] data)
      获取数组中最小值
      static int getMinimum​(int[] data)
      获取数组中最小值
      static long getMinimum​(long[] data)
      获取数组中最小值
      static int getMinimumIndex​(double[] data)
      获取数组中最小值索引
      static int getMinimumIndex​(float[] data)
      获取数组中最小值索引
      static int getMinimumIndex​(int[] data)
      获取数组中最小值索引
      static int getMinimumIndex​(long[] data)
      获取数组中最小值索引
      static <T> T getNotNull​(T[] array, T value)
      根据指定 value 获取 value 所在位置 + 偏移量的值, 不允许值为 null
      static <T> T getNotNull​(T[] array, T value, int number)
      根据指定 value 获取 value 所在位置 + 偏移量的值, 不允许值为 null
      static int getPosition​(boolean[] array, boolean value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static int getPosition​(byte[] array, byte value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static int getPosition​(char[] array, char value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static int getPosition​(double[] array, double value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static int getPosition​(float[] array, float value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static int getPosition​(int[] array, int value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static int getPosition​(long[] array, long value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static int getPosition​(short[] array, short value, int number, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static <T> int getPosition​(T[] array, T value)
      根据指定 value 获取索引
      static <T> int getPosition​(T[] array, T value, boolean notNull)
      根据指定 value 获取索引
      static <T> int getPosition​(T[] array, T value, int number)
      根据指定 value 获取索引
      static <T> int getPosition​(T[] array, T value, int number, boolean notNull)
      根据指定 value 获取索引
      static <T> int getPosition​(T[] array, T value, int number, boolean notNull, int offset)
      根据指定值获取 value 所在位置 + 偏移量的索引
      static <T> int getPositionNotNull​(T[] array, T value)
      根据指定 value 获取索引, 不允许值为 null
      static <T> int getPositionNotNull​(T[] array, T value, int number)
      根据指定 value 获取索引, 不允许值为 null
      static int[] integersToInts​(java.lang.Integer[] integers, int defaultValue)
      Integer[] 转换 int[]
      static java.lang.Integer[] intsToIntegers​(int[] ints)
      int[] 转换 Integer[]
      static boolean isEmpty​(boolean[] booleans)
      判断数组是否为 null
      static boolean isEmpty​(byte[] bytes)
      判断数组是否为 null
      static boolean isEmpty​(char[] chars)
      判断数组是否为 null
      static boolean isEmpty​(double[] doubles)
      判断数组是否为 null
      static boolean isEmpty​(float[] floats)
      判断数组是否为 null
      static boolean isEmpty​(int[] ints)
      判断数组是否为 null
      static boolean isEmpty​(long[] longs)
      判断数组是否为 null
      static boolean isEmpty​(short[] shorts)
      判断数组是否为 null
      static boolean isEmpty​(java.lang.Object object)
      判断数组是否为 null
      static boolean isEmpty​(java.lang.Object[] objects)
      判断数组是否为 null
      static boolean isLength​(boolean[] booleans, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(byte[] bytes, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(char[] chars, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(double[] doubles, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(float[] floats, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(int[] ints, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(long[] longs, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(short[] shorts, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(java.lang.Object[] objects, int length)
      判断数组长度是否等于期望长度
      static boolean isLength​(java.lang.Object object, int length)
      判断数组长度是否等于期望长度
      static boolean isNotEmpty​(boolean[] booleans)
      判断数组是否不为 null
      static boolean isNotEmpty​(byte[] bytes)
      判断数组是否不为 null
      static boolean isNotEmpty​(char[] chars)
      判断数组是否不为 null
      static boolean isNotEmpty​(double[] doubles)
      判断数组是否不为 null
      static boolean isNotEmpty​(float[] floats)
      判断数组是否不为 null
      static boolean isNotEmpty​(int[] ints)
      判断数组是否不为 null
      static boolean isNotEmpty​(long[] longs)
      判断数组是否不为 null
      static boolean isNotEmpty​(short[] shorts)
      判断数组是否不为 null
      static boolean isNotEmpty​(java.lang.Object object)
      判断数组是否不为 null
      static boolean isNotEmpty​(java.lang.Object[] objects)
      判断数组是否不为 null
      static int length​(boolean[] booleans)
      获取数组长度
      static int length​(boolean[] booleans, int defaultLength)
      获取数组长度
      static int length​(byte[] bytes)
      获取数组长度
      static int length​(byte[] bytes, int defaultLength)
      获取数组长度
      static int length​(char[] chars)
      获取数组长度
      static int length​(char[] chars, int defaultLength)
      获取数组长度
      static int length​(double[] doubles)
      获取数组长度
      static int length​(double[] doubles, int defaultLength)
      获取数组长度
      static int length​(float[] floats)
      获取数组长度
      static int length​(float[] floats, int defaultLength)
      获取数组长度
      static int length​(int[] ints)
      获取数组长度
      static int length​(int[] ints, int defaultLength)
      获取数组长度
      static int length​(long[] longs)
      获取数组长度
      static int length​(long[] longs, int defaultLength)
      获取数组长度
      static int length​(short[] shorts)
      获取数组长度
      static int length​(short[] shorts, int defaultLength)
      获取数组长度
      static int length​(java.lang.Object object)
      获取数组长度
      static int length​(java.lang.Object[] objects)
      获取数组长度
      static int length​(java.lang.Object[] objects, int defaultLength)
      获取数组长度
      static int length​(java.lang.Object object, int defaultLength)
      获取数组长度
      static java.lang.Long[] longsToLongs​(long[] longs)
      long[] 转换 Long[]
      static long[] longsToLongs​(java.lang.Long[] longs, long defaultValue)
      Long[] 转换 long[]
      static boolean[] newArray​(boolean[] data, int length)
      创建指定长度数组
      static byte[] newArray​(byte[] data, int length)
      创建指定长度数组
      static char[] newArray​(char[] data, int length)
      创建指定长度数组
      static double[] newArray​(double[] data, int length)
      创建指定长度数组
      static float[] newArray​(float[] data, int length)
      创建指定长度数组
      static int[] newArray​(int[] data, int length)
      创建指定长度数组
      static long[] newArray​(long[] data, int length)
      创建指定长度数组
      static short[] newArray​(short[] data, int length)
      创建指定长度数组
      static <T> T[] newArray​(T[] data, int length)
      创建指定长度数组
      static java.lang.Short[] shortsToShorts​(short[] shorts)
      short[] 转换 Short[]
      static short[] shortsToShorts​(java.lang.Short[] shorts, short defaultValue)
      Short[] 转换 short[]
      static boolean[] subArray​(boolean[] data, int off, int length)
      从数组上截取一段
      static byte[] subArray​(byte[] data, int off, int length)
      从数组上截取一段
      static char[] subArray​(char[] data, int off, int length)
      从数组上截取一段
      static double[] subArray​(double[] data, int off, int length)
      从数组上截取一段
      static float[] subArray​(float[] data, int off, int length)
      从数组上截取一段
      static int[] subArray​(int[] data, int off, int length)
      从数组上截取一段
      static long[] subArray​(long[] data, int off, int length)
      从数组上截取一段
      static short[] subArray​(short[] data, int off, int length)
      从数组上截取一段
      static <T> T[] subArray​(T[] data, int off, int length)
      从数组上截取一段
      static double sumArray​(double[] data)
      计算数组总和
      static double sumArray​(double[] data, int end)
      计算数组总和
      static double sumArray​(double[] data, int end, double extra)
      计算数组总和
      static double sumArray​(double[] data, int start, int end, double extra)
      计算数组总和
      static float sumArray​(float[] data)
      计算数组总和
      static float sumArray​(float[] data, int end)
      计算数组总和
      static float sumArray​(float[] data, int end, float extra)
      计算数组总和
      static float sumArray​(float[] data, int start, int end, float extra)
      计算数组总和
      static int sumArray​(int[] data)
      计算数组总和
      static int sumArray​(int[] data, int end)
      计算数组总和
      static int sumArray​(int[] data, int end, int extra)
      计算数组总和
      static int sumArray​(int[] data, int start, int end, int extra)
      计算数组总和
      static long sumArray​(long[] data)
      计算数组总和
      static long sumArray​(long[] data, int end)
      计算数组总和
      static long sumArray​(long[] data, int start, int end, long extra)
      计算数组总和
      static long sumArray​(long[] data, int end, long extra)
      计算数组总和
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • isEmpty

        public static boolean isEmpty​(java.lang.Object[] objects)
        判断数组是否为 null
        参数:
        objects - object[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(int[] ints)
        判断数组是否为 null
        参数:
        ints - int[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(byte[] bytes)
        判断数组是否为 null
        参数:
        bytes - byte[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(char[] chars)
        判断数组是否为 null
        参数:
        chars - char[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(short[] shorts)
        判断数组是否为 null
        参数:
        shorts - short[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(long[] longs)
        判断数组是否为 null
        参数:
        longs - long[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(float[] floats)
        判断数组是否为 null
        参数:
        floats - float[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(double[] doubles)
        判断数组是否为 null
        参数:
        doubles - double[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(boolean[] booleans)
        判断数组是否为 null
        参数:
        booleans - boolean[]
        返回:
        true yes, false no
      • isEmpty

        public static boolean isEmpty​(java.lang.Object object)
        判断数组是否为 null
        参数:
        object - Array[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(java.lang.Object[] objects)
        判断数组是否不为 null
        参数:
        objects - object[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(int[] ints)
        判断数组是否不为 null
        参数:
        ints - int[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(byte[] bytes)
        判断数组是否不为 null
        参数:
        bytes - byte[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(char[] chars)
        判断数组是否不为 null
        参数:
        chars - char[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(short[] shorts)
        判断数组是否不为 null
        参数:
        shorts - short[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(long[] longs)
        判断数组是否不为 null
        参数:
        longs - long[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(float[] floats)
        判断数组是否不为 null
        参数:
        floats - float[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(double[] doubles)
        判断数组是否不为 null
        参数:
        doubles - double[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(boolean[] booleans)
        判断数组是否不为 null
        参数:
        booleans - boolean[]
        返回:
        true yes, false no
      • isNotEmpty

        public static boolean isNotEmpty​(java.lang.Object object)
        判断数组是否不为 null
        参数:
        object - Array[]
        返回:
        true yes, false no
      • length

        public static int length​(java.lang.Object[] objects)
        获取数组长度
        参数:
        objects - object[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(int[] ints)
        获取数组长度
        参数:
        ints - int[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(byte[] bytes)
        获取数组长度
        参数:
        bytes - byte[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(char[] chars)
        获取数组长度
        参数:
        chars - char[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(short[] shorts)
        获取数组长度
        参数:
        shorts - short[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(long[] longs)
        获取数组长度
        参数:
        longs - long[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(float[] floats)
        获取数组长度
        参数:
        floats - float[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(double[] doubles)
        获取数组长度
        参数:
        doubles - double[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(boolean[] booleans)
        获取数组长度
        参数:
        booleans - boolean[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(java.lang.Object object)
        获取数组长度
        参数:
        object - Array[]
        返回:
        如果数据为 null, 则返回默认长度, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(java.lang.Object[] objects,
                                 int defaultLength)
        获取数组长度
        参数:
        objects - object[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(int[] ints,
                                 int defaultLength)
        获取数组长度
        参数:
        ints - int[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(byte[] bytes,
                                 int defaultLength)
        获取数组长度
        参数:
        bytes - byte[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(char[] chars,
                                 int defaultLength)
        获取数组长度
        参数:
        chars - char[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(short[] shorts,
                                 int defaultLength)
        获取数组长度
        参数:
        shorts - short[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(long[] longs,
                                 int defaultLength)
        获取数组长度
        参数:
        longs - long[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(float[] floats,
                                 int defaultLength)
        获取数组长度
        参数:
        floats - float[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(double[] doubles,
                                 int defaultLength)
        获取数组长度
        参数:
        doubles - double[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(boolean[] booleans,
                                 int defaultLength)
        获取数组长度
        参数:
        booleans - boolean[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • length

        public static int length​(java.lang.Object object,
                                 int defaultLength)
        获取数组长度
        参数:
        object - Array[]
        defaultLength - 数组为 null 时, 返回的长度
        返回:
        如果数据为 null, 则返回 defaultLength, 如果不为 null, 则返回 array[].length
      • isLength

        public static boolean isLength​(java.lang.Object[] objects,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        objects - object[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(int[] ints,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        ints - int[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(byte[] bytes,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        bytes - byte[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(char[] chars,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        chars - char[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(short[] shorts,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        shorts - short[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(long[] longs,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        longs - long[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(float[] floats,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        floats - float[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(double[] doubles,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        doubles - double[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(boolean[] booleans,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        booleans - boolean[]
        length - 期望长度
        返回:
        true yes, false no
      • isLength

        public static boolean isLength​(java.lang.Object object,
                                       int length)
        判断数组长度是否等于期望长度
        参数:
        object - Array[]
        length - 期望长度
        返回:
        true yes, false no
      • getCount

        public static int getCount​(java.lang.Object... objects)
        获取数组长度总和
        参数:
        objects - Array[]
        返回:
        数组长度总和
      • getByArray

        public static <T> T getByArray​(java.lang.Object array,
                                       int pos)
        获取数组对应索引数据
        类型参数:
        T - 泛型
        参数:
        array - 数组
        pos - 索引
        返回:
        数组指定索引的值
      • getByArray

        public static <T> T getByArray​(java.lang.Object array,
                                       int pos,
                                       T defaultValue)
        获取数组对应索引数据
        类型参数:
        T - 泛型
        参数:
        array - 数组
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值
      • get

        public static <T> T get​(T[] array,
                                int pos)
        获取数组对应索引数据
        类型参数:
        T - 泛型
        参数:
        array - 数组
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static int get​(int[] ints,
                              int pos)
        获取数组对应索引数据
        参数:
        ints - int[]
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static byte get​(byte[] bytes,
                               int pos)
        获取数组对应索引数据
        参数:
        bytes - byte[]
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static char get​(char[] chars,
                               int pos)
        获取数组对应索引数据
        参数:
        chars - char[]
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static short get​(short[] shorts,
                                int pos)
        获取数组对应索引数据
        参数:
        shorts - short[]
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static long get​(long[] longs,
                               int pos)
        获取数组对应索引数据
        参数:
        longs - long[]
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static float get​(float[] floats,
                                int pos)
        获取数组对应索引数据
        参数:
        floats - float[]
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static double get​(double[] doubles,
                                 int pos)
        获取数组对应索引数据
        参数:
        doubles - double[]
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static boolean get​(boolean[] booleans,
                                  int pos)
        获取数组对应索引数据
        参数:
        booleans - boolean[]
        pos - 索引
        返回:
        数组指定索引的值
      • get

        public static <T> T get​(T[] array,
                                int pos,
                                T defaultValue)
        获取数组对应索引数据
        类型参数:
        T - 泛型
        参数:
        array - 数组
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • get

        public static int get​(int[] ints,
                              int pos,
                              int defaultValue)
        获取数组对应索引数据
        参数:
        ints - int[]
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • get

        public static byte get​(byte[] bytes,
                               int pos,
                               byte defaultValue)
        获取数组对应索引数据
        参数:
        bytes - byte[]
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • get

        public static char get​(char[] chars,
                               int pos,
                               char defaultValue)
        获取数组对应索引数据
        参数:
        chars - char[]
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • get

        public static short get​(short[] shorts,
                                int pos,
                                short defaultValue)
        获取数组对应索引数据
        参数:
        shorts - short[]
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • get

        public static long get​(long[] longs,
                               int pos,
                               long defaultValue)
        获取数组对应索引数据
        参数:
        longs - long[]
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • get

        public static float get​(float[] floats,
                                int pos,
                                float defaultValue)
        获取数组对应索引数据
        参数:
        floats - float[]
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • get

        public static double get​(double[] doubles,
                                 int pos,
                                 double defaultValue)
        获取数组对应索引数据
        参数:
        doubles - double[]
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • get

        public static boolean get​(boolean[] booleans,
                                  int pos,
                                  boolean defaultValue)
        获取数组对应索引数据
        参数:
        booleans - boolean[]
        pos - 索引
        defaultValue - 默认值
        返回:
        数组指定索引的值, 如果获取失败, 则返回 defaultValue
      • getFirst

        public static <T> T getFirst​(T[] array)
        获取数组第一条数据
        类型参数:
        T - 泛型
        参数:
        array - 数组
        返回:
        数组索引为 0 的值
      • getFirst

        public static int getFirst​(int[] ints)
        获取数组第一条数据
        参数:
        ints - int[]
        返回:
        数组索引为 0 的值
      • getFirst

        public static byte getFirst​(byte[] bytes)
        获取数组第一条数据
        参数:
        bytes - byte[]
        返回:
        数组索引为 0 的值
      • getFirst

        public static char getFirst​(char[] chars)
        获取数组第一条数据
        参数:
        chars - char[]
        返回:
        数组索引为 0 的值
      • getFirst

        public static short getFirst​(short[] shorts)
        获取数组第一条数据
        参数:
        shorts - short[]
        返回:
        数组索引为 0 的值
      • getFirst

        public static long getFirst​(long[] longs)
        获取数组第一条数据
        参数:
        longs - long[]
        返回:
        数组索引为 0 的值
      • getFirst

        public static float getFirst​(float[] floats)
        获取数组第一条数据
        参数:
        floats - float[]
        返回:
        数组索引为 0 的值
      • getFirst

        public static double getFirst​(double[] doubles)
        获取数组第一条数据
        参数:
        doubles - double[]
        返回:
        数组索引为 0 的值
      • getFirst

        public static boolean getFirst​(boolean[] booleans)
        获取数组第一条数据
        参数:
        booleans - boolean[]
        返回:
        数组索引为 0 的值
      • getLast

        public static <T> T getLast​(T[] array)
        获取数组最后一条数据
        类型参数:
        T - 泛型
        参数:
        array - 数组
        返回:
        数组索引 length - 1 的值
      • getLast

        public static int getLast​(int[] ints)
        获取数组最后一条数据
        参数:
        ints - int[]
        返回:
        数组索引 length - 1 的值
      • getLast

        public static byte getLast​(byte[] bytes)
        获取数组最后一条数据
        参数:
        bytes - byte[]
        返回:
        数组索引 length - 1 的值
      • getLast

        public static char getLast​(char[] chars)
        获取数组最后一条数据
        参数:
        chars - char[]
        返回:
        数组索引 length - 1 的值
      • getLast

        public static short getLast​(short[] shorts)
        获取数组最后一条数据
        参数:
        shorts - short[]
        返回:
        数组索引 length - 1 的值
      • getLast

        public static long getLast​(long[] longs)
        获取数组最后一条数据
        参数:
        longs - long[]
        返回:
        数组索引 length - 1 的值
      • getLast

        public static float getLast​(float[] floats)
        获取数组最后一条数据
        参数:
        floats - float[]
        返回:
        数组索引 length - 1 的值
      • getLast

        public static double getLast​(double[] doubles)
        获取数组最后一条数据
        参数:
        doubles - double[]
        返回:
        数组索引 length - 1 的值
      • getLast

        public static boolean getLast​(boolean[] booleans)
        获取数组最后一条数据
        参数:
        booleans - boolean[]
        返回:
        数组索引 length - 1 的值
      • get

        public static <T> T get​(T[] array,
                                T value,
                                int number,
                                boolean notNull,
                                int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        notNull - 是否不允许值为 null
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static <T> int getPosition​(T[] array,
                                          T value,
                                          int number,
                                          boolean notNull,
                                          int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        notNull - 是否不允许值为 null
        offset - 偏移量
        返回:
        对应的索引
      • get

        public static <T> T get​(T[] array,
                                T value)
        根据指定 value 获取 value 所在位置 + 偏移量的值
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        返回:
        对应索引的值
      • get

        public static <T> T get​(T[] array,
                                T value,
                                int number)
        根据指定 value 获取 value 所在位置 + 偏移量的值
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        返回:
        对应索引的值
      • get

        public static <T> T get​(T[] array,
                                T value,
                                boolean notNull)
        根据指定 value 获取 value 所在位置 + 偏移量的值
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        notNull - 是否不允许值为 null
        返回:
        对应索引的值
      • get

        public static <T> T get​(T[] array,
                                T value,
                                int number,
                                boolean notNull)
        根据指定 value 获取 value 所在位置 + 偏移量的值
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        notNull - 是否不允许值为 null
        返回:
        对应索引的值
      • getNotNull

        public static <T> T getNotNull​(T[] array,
                                       T value)
        根据指定 value 获取 value 所在位置 + 偏移量的值, 不允许值为 null
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        返回:
        对应索引的值
      • getNotNull

        public static <T> T getNotNull​(T[] array,
                                       T value,
                                       int number)
        根据指定 value 获取 value 所在位置 + 偏移量的值, 不允许值为 null
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        返回:
        对应索引的值
      • getPosition

        public static <T> int getPosition​(T[] array,
                                          T value)
        根据指定 value 获取索引
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        返回:
        对应的索引
      • getPosition

        public static <T> int getPosition​(T[] array,
                                          T value,
                                          int number)
        根据指定 value 获取索引
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        返回:
        对应的索引
      • getPosition

        public static <T> int getPosition​(T[] array,
                                          T value,
                                          boolean notNull)
        根据指定 value 获取索引
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        notNull - 是否不允许值为 null
        返回:
        对应的索引
      • getPosition

        public static <T> int getPosition​(T[] array,
                                          T value,
                                          int number,
                                          boolean notNull)
        根据指定 value 获取索引
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        notNull - 是否不允许值为 null
        返回:
        对应的索引
      • getPositionNotNull

        public static <T> int getPositionNotNull​(T[] array,
                                                 T value)
        根据指定 value 获取索引, 不允许值为 null
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        返回:
        对应的索引
      • getPositionNotNull

        public static <T> int getPositionNotNull​(T[] array,
                                                 T value,
                                                 int number)
        根据指定 value 获取索引, 不允许值为 null
        类型参数:
        T - 泛型
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        返回:
        对应的索引
      • get

        public static int get​(int[] array,
                              int value,
                              int number,
                              int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static int getPosition​(int[] array,
                                      int value,
                                      int number,
                                      int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应的索引
      • get

        public static byte get​(byte[] array,
                               byte value,
                               int number,
                               int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static int getPosition​(byte[] array,
                                      byte value,
                                      int number,
                                      int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应的索引
      • get

        public static char get​(char[] array,
                               char value,
                               int number,
                               int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static int getPosition​(char[] array,
                                      char value,
                                      int number,
                                      int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应的索引
      • get

        public static short get​(short[] array,
                                short value,
                                int number,
                                int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static int getPosition​(short[] array,
                                      short value,
                                      int number,
                                      int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应的索引
      • get

        public static long get​(long[] array,
                               long value,
                               int number,
                               int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static int getPosition​(long[] array,
                                      long value,
                                      int number,
                                      int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应的索引
      • get

        public static float get​(float[] array,
                                float value,
                                int number,
                                int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static int getPosition​(float[] array,
                                      float value,
                                      int number,
                                      int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应的索引
      • get

        public static double get​(double[] array,
                                 double value,
                                 int number,
                                 int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static int getPosition​(double[] array,
                                      double value,
                                      int number,
                                      int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应的索引
      • get

        public static boolean get​(boolean[] array,
                                  boolean value,
                                  int number,
                                  int offset)
        根据指定值获取 value 所在位置 + 偏移量的值
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应索引的值
      • getPosition

        public static int getPosition​(boolean[] array,
                                      boolean value,
                                      int number,
                                      int offset)
        根据指定值获取 value 所在位置 + 偏移量的索引
        参数:
        array - 数组
        value - 值
        number - 符合条件次数 ( 从 0 开始, 0 = 1 )
        offset - 偏移量
        返回:
        对应的索引
      • intsToIntegers

        public static java.lang.Integer[] intsToIntegers​(int[] ints)
        int[] 转换 Integer[]
        参数:
        ints - int[]
        返回:
        Integer
      • bytesToBytes

        public static java.lang.Byte[] bytesToBytes​(byte[] bytes)
        byte[] 转换 Byte[]
        参数:
        bytes - byte[]
        返回:
        Byte
      • charsToCharacters

        public static java.lang.Character[] charsToCharacters​(char[] chars)
        char[] 转换 Character[]
        参数:
        chars - char[]
        返回:
        Character
      • shortsToShorts

        public static java.lang.Short[] shortsToShorts​(short[] shorts)
        short[] 转换 Short[]
        参数:
        shorts - short[]
        返回:
        Short
      • longsToLongs

        public static java.lang.Long[] longsToLongs​(long[] longs)
        long[] 转换 Long[]
        参数:
        longs - long[]
        返回:
        Long
      • floatsToFloats

        public static java.lang.Float[] floatsToFloats​(float[] floats)
        float[] 转换 Float[]
        参数:
        floats - float[]
        返回:
        Float
      • doublesToDoubles

        public static java.lang.Double[] doublesToDoubles​(double[] doubles)
        double[] 转换 Double[]
        参数:
        doubles - double[]
        返回:
        Double
      • booleansToBooleans

        public static java.lang.Boolean[] booleansToBooleans​(boolean[] booleans)
        boolean[] 转换 Boolean[]
        参数:
        booleans - boolean[]
        返回:
        Boolean
      • integersToInts

        public static int[] integersToInts​(java.lang.Integer[] integers,
                                           int defaultValue)
        Integer[] 转换 int[]
        参数:
        integers - Integer[]
        defaultValue - 转换失败使用得默认值
        返回:
        int[]
      • bytesToBytes

        public static byte[] bytesToBytes​(java.lang.Byte[] bytes,
                                          byte defaultValue)
        Byte[] 转换 byte[]
        参数:
        bytes - Byte[]
        defaultValue - 转换失败使用得默认值
        返回:
        byte[]
      • charactersToChars

        public static char[] charactersToChars​(java.lang.Character[] characters,
                                               char defaultValue)
        Character[] 转换 char[]
        参数:
        characters - Character[]
        defaultValue - 转换失败使用得默认值
        返回:
        char[]
      • shortsToShorts

        public static short[] shortsToShorts​(java.lang.Short[] shorts,
                                             short defaultValue)
        Short[] 转换 short[]
        参数:
        shorts - Short[]
        defaultValue - 转换失败使用得默认值
        返回:
        short[]
      • longsToLongs

        public static long[] longsToLongs​(java.lang.Long[] longs,
                                          long defaultValue)
        Long[] 转换 long[]
        参数:
        longs - Long[]
        defaultValue - 转换失败使用得默认值
        返回:
        long[]
      • floatsToFloats

        public static float[] floatsToFloats​(java.lang.Float[] floats,
                                             float defaultValue)
        Float[] 转换 float[]
        参数:
        floats - Float[]
        defaultValue - 转换失败使用得默认值
        返回:
        float[]
      • doublesToDoubles

        public static double[] doublesToDoubles​(java.lang.Double[] doubles,
                                                double defaultValue)
        Double[] 转换 double[]
        参数:
        doubles - Double[]
        defaultValue - 转换失败使用得默认值
        返回:
        double[]
      • booleansToBooleans

        public static boolean[] booleansToBooleans​(java.lang.Boolean[] booleans,
                                                   boolean defaultValue)
        Boolean[] 转换 boolean[]
        参数:
        booleans - Boolean[]
        defaultValue - 转换失败使用得默认值
        返回:
        boolean[]
      • asList

        public static <T> java.util.List<T> asList​(T[] array)
        转换数组为集合
        类型参数:
        T - 泛型
        参数:
        array - 数组
        返回:
        List
      • asListArgs

        public static <T> java.util.List<T> asListArgs​(T... array)
        转换数组为集合
        类型参数:
        T - 泛型
        参数:
        array - 数组
        返回:
        List
      • asList

        public static java.util.List<java.lang.Integer> asList​(int[] ints)
        转换数组为集合
        参数:
        ints - int[]
        返回:
        List
      • asList

        public static java.util.List<java.lang.Byte> asList​(byte[] bytes)
        转换数组为集合
        参数:
        bytes - byte[]
        返回:
        List
      • asList

        public static java.util.List<java.lang.Character> asList​(char[] chars)
        转换数组为集合
        参数:
        chars - char[]
        返回:
        List
      • asList

        public static java.util.List<java.lang.Short> asList​(short[] shorts)
        转换数组为集合
        参数:
        shorts - short[]
        返回:
        List
      • asList

        public static java.util.List<java.lang.Long> asList​(long[] longs)
        转换数组为集合
        参数:
        longs - long[]
        返回:
        List
      • asList

        public static java.util.List<java.lang.Float> asList​(float[] floats)
        转换数组为集合
        参数:
        floats - float[]
        返回:
        List
      • asList

        public static java.util.List<java.lang.Double> asList​(double[] doubles)
        转换数组为集合
        参数:
        doubles - double[]
        返回:
        List
      • asList

        public static java.util.List<java.lang.Boolean> asList​(boolean[] booleans)
        转换数组为集合
        参数:
        booleans - boolean[]
        返回:
        List
      • asListArgsInt

        public static java.util.List<java.lang.Integer> asListArgsInt​(int... ints)
        转换数组为集合
        参数:
        ints - int[]
        返回:
        List
      • asListArgsByte

        public static java.util.List<java.lang.Byte> asListArgsByte​(byte... bytes)
        转换数组为集合
        参数:
        bytes - byte[]
        返回:
        List
      • asListArgsChar

        public static java.util.List<java.lang.Character> asListArgsChar​(char... chars)
        转换数组为集合
        参数:
        chars - char[]
        返回:
        List
      • asListArgsShort

        public static java.util.List<java.lang.Short> asListArgsShort​(short... shorts)
        转换数组为集合
        参数:
        shorts - short[]
        返回:
        List
      • asListArgsLong

        public static java.util.List<java.lang.Long> asListArgsLong​(long... longs)
        转换数组为集合
        参数:
        longs - long[]
        返回:
        List
      • asListArgsFloat

        public static java.util.List<java.lang.Float> asListArgsFloat​(float... floats)
        转换数组为集合
        参数:
        floats - float[]
        返回:
        List
      • asListArgsDouble

        public static java.util.List<java.lang.Double> asListArgsDouble​(double... doubles)
        转换数组为集合
        参数:
        doubles - double[]
        返回:
        List
      • asListArgsBoolean

        public static java.util.List<java.lang.Boolean> asListArgsBoolean​(boolean... booleans)
        转换数组为集合
        参数:
        booleans - boolean[]
        返回:
        List
      • equals

        public static <T> boolean equals​(T value1,
                                         T value2)
        判断两个值是否一样
        类型参数:
        T - 泛型
        参数:
        value1 - 第一个值
        value2 - 第二个值
        返回:
        true yes, false no
      • arrayCopy

        public static <T> T[] arrayCopy​(T[] prefix,
                                        T[] suffix)
        拼接数组
        类型参数:
        T - 泛型
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组集合
      • arrayCopy

        public static int[] arrayCopy​(int[] prefix,
                                      int[] suffix)
        拼接数组
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组
      • arrayCopy

        public static byte[] arrayCopy​(byte[] prefix,
                                       byte[] suffix)
        拼接数组
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组
      • arrayCopy

        public static char[] arrayCopy​(char[] prefix,
                                       char[] suffix)
        拼接数组
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组
      • arrayCopy

        public static short[] arrayCopy​(short[] prefix,
                                        short[] suffix)
        拼接数组
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组
      • arrayCopy

        public static long[] arrayCopy​(long[] prefix,
                                       long[] suffix)
        拼接数组
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组
      • arrayCopy

        public static float[] arrayCopy​(float[] prefix,
                                        float[] suffix)
        拼接数组
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组
      • arrayCopy

        public static double[] arrayCopy​(double[] prefix,
                                         double[] suffix)
        拼接数组
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组
      • arrayCopy

        public static boolean[] arrayCopy​(boolean[] prefix,
                                          boolean[] suffix)
        拼接数组
        参数:
        prefix - 第一个数组
        suffix - 第二个数组
        返回:
        拼接后的数组
      • newArray

        public static <T> T[] newArray​(T[] data,
                                       int length)
        创建指定长度数组
        类型参数:
        T - 泛型
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • newArray

        public static int[] newArray​(int[] data,
                                     int length)
        创建指定长度数组
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • newArray

        public static byte[] newArray​(byte[] data,
                                      int length)
        创建指定长度数组
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • newArray

        public static char[] newArray​(char[] data,
                                      int length)
        创建指定长度数组
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • newArray

        public static short[] newArray​(short[] data,
                                       int length)
        创建指定长度数组
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • newArray

        public static long[] newArray​(long[] data,
                                      int length)
        创建指定长度数组
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • newArray

        public static float[] newArray​(float[] data,
                                       int length)
        创建指定长度数组
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • newArray

        public static double[] newArray​(double[] data,
                                        int length)
        创建指定长度数组
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • newArray

        public static boolean[] newArray​(boolean[] data,
                                         int length)
        创建指定长度数组
        参数:
        data - 待处理数组
        length - 保留长度
        返回:
        指定长度数组
      • subArray

        public static <T> T[] subArray​(T[] data,
                                       int off,
                                       int length)
        从数组上截取一段
        类型参数:
        T - 泛型
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • subArray

        public static int[] subArray​(int[] data,
                                     int off,
                                     int length)
        从数组上截取一段
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • subArray

        public static byte[] subArray​(byte[] data,
                                      int off,
                                      int length)
        从数组上截取一段
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • subArray

        public static char[] subArray​(char[] data,
                                      int off,
                                      int length)
        从数组上截取一段
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • subArray

        public static short[] subArray​(short[] data,
                                       int off,
                                       int length)
        从数组上截取一段
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • subArray

        public static long[] subArray​(long[] data,
                                      int off,
                                      int length)
        从数组上截取一段
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • subArray

        public static float[] subArray​(float[] data,
                                       int off,
                                       int length)
        从数组上截取一段
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • subArray

        public static double[] subArray​(double[] data,
                                        int off,
                                        int length)
        从数组上截取一段
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • subArray

        public static boolean[] subArray​(boolean[] data,
                                         int off,
                                         int length)
        从数组上截取一段
        参数:
        data - 数组
        off - 起始值
        length - 所需长度
        返回:
        裁剪后的数组
      • appendToString

        public static <T> java.lang.String appendToString​(T[] data)
        追加数组内容字符串
        类型参数:
        T - 泛型
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • appendToString

        public static java.lang.String appendToString​(int[] data)
        追加数组内容字符串
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • appendToString

        public static java.lang.String appendToString​(byte[] data)
        追加数组内容字符串
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • appendToString

        public static java.lang.String appendToString​(char[] data)
        追加数组内容字符串
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • appendToString

        public static java.lang.String appendToString​(short[] data)
        追加数组内容字符串
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • appendToString

        public static java.lang.String appendToString​(long[] data)
        追加数组内容字符串
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • appendToString

        public static java.lang.String appendToString​(float[] data)
        追加数组内容字符串
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • appendToString

        public static java.lang.String appendToString​(double[] data)
        追加数组内容字符串
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • appendToString

        public static java.lang.String appendToString​(boolean[] data)
        追加数组内容字符串
        参数:
        data - 数组
        返回:
        追加数组内容字符串
      • getMinimumIndex

        public static int getMinimumIndex​(int[] data)
        获取数组中最小值索引
        参数:
        data - 数组
        返回:
        最小值索引
      • getMinimumIndex

        public static int getMinimumIndex​(long[] data)
        获取数组中最小值索引
        参数:
        data - 数组
        返回:
        最小值索引
      • getMinimumIndex

        public static int getMinimumIndex​(float[] data)
        获取数组中最小值索引
        参数:
        data - 数组
        返回:
        最小值索引
      • getMinimumIndex

        public static int getMinimumIndex​(double[] data)
        获取数组中最小值索引
        参数:
        data - 数组
        返回:
        最小值索引
      • getMaximumIndex

        public static int getMaximumIndex​(int[] data)
        获取数组中最大值索引
        参数:
        data - 数组
        返回:
        最大值索引
      • getMaximumIndex

        public static int getMaximumIndex​(long[] data)
        获取数组中最大值索引
        参数:
        data - 数组
        返回:
        最大值索引
      • getMaximumIndex

        public static int getMaximumIndex​(float[] data)
        获取数组中最大值索引
        参数:
        data - 数组
        返回:
        最大值索引
      • getMaximumIndex

        public static int getMaximumIndex​(double[] data)
        获取数组中最大值索引
        参数:
        data - 数组
        返回:
        最大值索引
      • getMinimum

        public static int getMinimum​(int[] data)
        获取数组中最小值
        参数:
        data - 数组
        返回:
        最小值
      • getMinimum

        public static long getMinimum​(long[] data)
        获取数组中最小值
        参数:
        data - 数组
        返回:
        最小值
      • getMinimum

        public static float getMinimum​(float[] data)
        获取数组中最小值
        参数:
        data - 数组
        返回:
        最小值
      • getMinimum

        public static double getMinimum​(double[] data)
        获取数组中最小值
        参数:
        data - 数组
        返回:
        最小值
      • getMaximum

        public static int getMaximum​(int[] data)
        获取数组中最大值
        参数:
        data - 数组
        返回:
        最大值
      • getMaximum

        public static long getMaximum​(long[] data)
        获取数组中最大值
        参数:
        data - 数组
        返回:
        最大值
      • getMaximum

        public static float getMaximum​(float[] data)
        获取数组中最大值
        参数:
        data - 数组
        返回:
        最大值
      • getMaximum

        public static double getMaximum​(double[] data)
        获取数组中最大值
        参数:
        data - 数组
        返回:
        最大值
      • sumArray

        public static int sumArray​(int[] data)
        计算数组总和
        参数:
        data - 数组
        返回:
        数组总和
      • sumArray

        public static int sumArray​(int[] data,
                                   int end)
        计算数组总和
        参数:
        data - 数组
        end - 结束位置
        返回:
        数组总和
      • sumArray

        public static int sumArray​(int[] data,
                                   int end,
                                   int extra)
        计算数组总和
        参数:
        data - 数组
        end - 结束位置
        extra - 额外值
        返回:
        数组总和
      • sumArray

        public static int sumArray​(int[] data,
                                   int start,
                                   int end,
                                   int extra)
        计算数组总和
        参数:
        data - 数组
        start - 开始位置
        end - 结束位置
        extra - 额外值
        返回:
        数组总和
      • sumArray

        public static long sumArray​(long[] data)
        计算数组总和
        参数:
        data - 数组
        返回:
        数组总和
      • sumArray

        public static long sumArray​(long[] data,
                                    int end)
        计算数组总和
        参数:
        data - 数组
        end - 结束位置
        返回:
        数组总和
      • sumArray

        public static long sumArray​(long[] data,
                                    int end,
                                    long extra)
        计算数组总和
        参数:
        data - 数组
        end - 结束位置
        extra - 额外值
        返回:
        数组总和
      • sumArray

        public static long sumArray​(long[] data,
                                    int start,
                                    int end,
                                    long extra)
        计算数组总和
        参数:
        data - 数组
        start - 开始位置
        end - 结束位置
        extra - 额外值
        返回:
        数组总和
      • sumArray

        public static float sumArray​(float[] data)
        计算数组总和
        参数:
        data - 数组
        返回:
        数组总和
      • sumArray

        public static float sumArray​(float[] data,
                                     int end)
        计算数组总和
        参数:
        data - 数组
        end - 结束位置
        返回:
        数组总和
      • sumArray

        public static float sumArray​(float[] data,
                                     int end,
                                     float extra)
        计算数组总和
        参数:
        data - 数组
        end - 结束位置
        extra - 额外值
        返回:
        数组总和
      • sumArray

        public static float sumArray​(float[] data,
                                     int start,
                                     int end,
                                     float extra)
        计算数组总和
        参数:
        data - 数组
        start - 开始位置
        end - 结束位置
        extra - 额外值
        返回:
        数组总和
      • sumArray

        public static double sumArray​(double[] data)
        计算数组总和
        参数:
        data - 数组
        返回:
        数组总和
      • sumArray

        public static double sumArray​(double[] data,
                                      int end)
        计算数组总和
        参数:
        data - 数组
        end - 结束位置
        返回:
        数组总和
      • sumArray

        public static double sumArray​(double[] data,
                                      int end,
                                      double extra)
        计算数组总和
        参数:
        data - 数组
        end - 结束位置
        extra - 额外值
        返回:
        数组总和
      • sumArray

        public static double sumArray​(double[] data,
                                      int start,
                                      int end,
                                      double extra)
        计算数组总和
        参数:
        data - 数组
        start - 开始位置
        end - 结束位置
        extra - 额外值
        返回:
        数组总和