public final class ArrayPrimitiveUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static boolean[] |
BOOLEAN_EMPTY |
static byte[] |
BYTE_EMPTY |
static char[] |
CHAR_EMPTY |
static double[] |
DOUBLE_EMPTY |
static float[] |
FLOAT_EMPTY |
static int[] |
INT_EMPTY |
static long[] |
LONG_EMPTY |
static short[] |
SHORT_EMPTY |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<Integer> |
allIndexOf(char[] chars,
char c)
返回 c 对应的所有下标
|
static boolean |
contains(boolean[] arrays,
boolean val)
是否包含
|
static boolean |
contains(byte[] arrays,
byte val)
是否包含
|
static boolean |
contains(char[] chars,
char c)
是否包含
|
static boolean |
contains(double[] arrays,
double val)
是否包含
|
static boolean |
contains(float[] arrays,
float val)
是否包含
|
static boolean |
contains(int[] arrays,
int val)
是否包含
|
static boolean |
contains(long[] arrays,
long val)
是否包含
|
static boolean |
contains(short[] arrays,
short val)
是否包含
|
static String |
getStringBeforeSymbol(char[] chars,
int startIndex,
char symbol)
获取 char 数组指定的
(1)如果一直没有找到指定符号,则一直进行到底。
|
static int |
indexOf(char[] chars,
char c)
返回 c 对应的下标
|
static boolean |
isEmpty(boolean[] objects)
boolean 数组是否为空
|
static boolean |
isEmpty(byte[] objects)
byte 数组是否为空
|
static boolean |
isEmpty(char[] objects)
char 数组是否为空
|
static boolean |
isEmpty(double[] objects)
double 数组是否为空
|
static boolean |
isEmpty(float[] objects)
float 数组是否为空
|
static boolean |
isEmpty(int[] objects)
int 数组是否为空
|
static boolean |
isEmpty(long[] objects)
long 数组是否为空
|
static boolean |
isEmpty(short[] objects)
short 数组是否为空
|
static boolean |
isNotEmpty(boolean[] objects)
boolean 数组是否不为空
|
static boolean |
isNotEmpty(byte[] objects)
byte 数组是否不为空
|
static boolean |
isNotEmpty(char[] objects)
char 数组是否不为空
|
static boolean |
isNotEmpty(double[] objects)
double 数组是否不为空
|
static boolean |
isNotEmpty(float[] objects)
数组是否不为空
|
static boolean |
isNotEmpty(int[] objects)
数组是否不为空
|
static boolean |
isNotEmpty(long[] objects)
long 数组是否不为空
|
static boolean |
isNotEmpty(short[] objects)
short 数组是否不为空
|
static int |
lastIndexOf(char[] chars,
char c)
返回 c 对应的最后下标
|
static boolean[] |
newArray(boolean... arrays)
创建 boolean 数组
|
static byte[] |
newArray(byte... arrays)
创建 byte 数组
|
static char[] |
newArray(char... arrays)
创建 char 数组
|
static double[] |
newArray(double... arrays)
创建 double 数组
|
static float[] |
newArray(float... arrays)
创建 float 数组
|
static int[] |
newArray(int... arrays)
创建 int 数组
|
static long[] |
newArray(long... arrays)
创建 long 数组
|
static short[] |
newArray(short... arrays)
创建 short 数组
|
static <E> boolean[] |
toBooleanArray(List<E> list,
IHandler<E,Boolean> handler)
转换为数组
|
static <E> byte[] |
toByteArray(List<E> list,
IHandler<E,Byte> handler)
转换为数组
|
static <E> char[] |
toCharArray(List<E> list,
IHandler<E,Character> handler)
转换为数组
|
static <E> double[] |
toDoubleArray(List<E> list,
IHandler<E,Double> handler)
转换为数组
|
static <E> float[] |
toFloatArray(List<E> list,
IHandler<E,Float> handler)
转换为数组
|
static <E> int[] |
toIntArray(List<E> list,
IHandler<E,Integer> handler)
转换为数组
|
static <K> List<K> |
toList(boolean[] values,
IHandler<? super Boolean,K> keyFunction)
boolean 可遍历的元素对象的某个元素,转换为列表
|
static <K> List<K> |
toList(byte[] values,
IHandler<? super Byte,K> keyFunction)
byte 可遍历的元素对象的某个元素,转换为列表
|
static <K> List<K> |
toList(char[] values,
IHandler<? super Character,K> keyFunction)
char 可遍历的元素对象的某个元素,转换为列表
|
static <K> List<K> |
toList(double[] values,
IHandler<? super Double,K> keyFunction)
double 可遍历的元素对象的某个元素,转换为列表
|
static <K> List<K> |
toList(float[] values,
IHandler<? super Float,K> keyFunction)
float 可遍历的元素对象的某个元素,转换为列表
|
static <K> List<K> |
toList(int[] values,
IHandler<? super Integer,K> keyFunction)
int 可遍历的元素对象的某个元素,转换为列表
|
static <K> List<K> |
toList(long[] values,
IHandler<? super Long,K> keyFunction)
long 可遍历的元素对象的某个元素,转换为列表
|
static <K> List<K> |
toList(short[] values,
IHandler<? super Short,K> keyFunction)
short 可遍历的元素对象的某个元素,转换为列表
|
static <E> long[] |
toLongArray(List<E> list,
IHandler<E,Long> handler)
转换为数组
|
static <E> short[] |
toShortArray(List<E> list,
IHandler<E,Short> handler)
转换为数组
|
public static final int[] INT_EMPTY
public static final short[] SHORT_EMPTY
public static final long[] LONG_EMPTY
public static final float[] FLOAT_EMPTY
public static final double[] DOUBLE_EMPTY
public static final char[] CHAR_EMPTY
public static final byte[] BYTE_EMPTY
public static final boolean[] BOOLEAN_EMPTY
public static boolean isEmpty(int[] objects)
objects - 数组对象public static boolean isNotEmpty(int[] objects)
objects - 数组对象public static boolean isEmpty(boolean[] objects)
objects - 数组对象public static boolean isNotEmpty(boolean[] objects)
objects - 数组对象public static boolean isEmpty(char[] objects)
objects - 数组对象public static boolean isNotEmpty(char[] objects)
objects - 数组对象public static boolean isEmpty(byte[] objects)
objects - 数组对象public static boolean isNotEmpty(byte[] objects)
objects - 数组对象public static boolean isEmpty(long[] objects)
objects - 数组对象public static boolean isNotEmpty(long[] objects)
objects - 数组对象public static boolean isEmpty(float[] objects)
objects - 数组对象public static boolean isNotEmpty(float[] objects)
objects - 数组对象public static boolean isEmpty(double[] objects)
objects - 数组对象public static boolean isNotEmpty(double[] objects)
objects - 数组对象public static boolean isEmpty(short[] objects)
objects - 数组对象public static boolean isNotEmpty(short[] objects)
objects - 数组对象public static <K> List<K> toList(boolean[] values, IHandler<? super Boolean,K> keyFunction)
K - k 泛型values - 遍历对象keyFunction - 转换方式public static <K> List<K> toList(char[] values, IHandler<? super Character,K> keyFunction)
K - k 泛型values - 遍历对象keyFunction - 转换方式public static <K> List<K> toList(byte[] values, IHandler<? super Byte,K> keyFunction)
K - k 泛型values - 遍历对象keyFunction - 转换方式public static <K> List<K> toList(short[] values, IHandler<? super Short,K> keyFunction)
K - k 泛型values - 遍历对象keyFunction - 转换方式public static <K> List<K> toList(int[] values, IHandler<? super Integer,K> keyFunction)
K - k 泛型values - 遍历对象keyFunction - 转换方式public static <K> List<K> toList(float[] values, IHandler<? super Float,K> keyFunction)
K - k 泛型values - 遍历对象keyFunction - 转换方式public static <K> List<K> toList(double[] values, IHandler<? super Double,K> keyFunction)
K - k 泛型values - 遍历对象keyFunction - 转换方式public static <K> List<K> toList(long[] values, IHandler<? super Long,K> keyFunction)
K - k 泛型values - 遍历对象keyFunction - 转换方式public static int indexOf(char[] chars,
char c)
chars - 原始字符c - 目标public static boolean contains(boolean[] arrays,
boolean val)
arrays - 原始字符val - 目标public static boolean contains(byte[] arrays,
byte val)
arrays - 原始字符val - 目标public static boolean contains(short[] arrays,
short val)
arrays - 原始字符val - 目标public static boolean contains(int[] arrays,
int val)
arrays - 原始字符val - 目标public static boolean contains(long[] arrays,
long val)
arrays - 原始字符val - 目标public static boolean contains(float[] arrays,
float val)
arrays - 原始字符val - 目标public static boolean contains(double[] arrays,
double val)
arrays - 原始字符val - 目标public static boolean contains(char[] chars,
char c)
chars - 原始字符c - 目标public static int lastIndexOf(char[] chars,
char c)
chars - 原始字符c - 目标public static List<Integer> allIndexOf(char[] chars, char c)
chars - 原始字符c - 目标public static String getStringBeforeSymbol(char[] chars, int startIndex, char symbol)
chars - 字符数组startIndex - 开始下标symbol - 特殊标志public static <E> int[] toIntArray(List<E> list, IHandler<E,Integer> handler)
E - 泛型list - 列表handler - 转换实现public static <E> boolean[] toBooleanArray(List<E> list, IHandler<E,Boolean> handler)
E - 泛型list - 列表handler - 转换实现public static <E> char[] toCharArray(List<E> list, IHandler<E,Character> handler)
E - 泛型list - 列表handler - 转换实现public static <E> byte[] toByteArray(List<E> list, IHandler<E,Byte> handler)
E - 泛型list - 列表handler - 转换实现public static <E> short[] toShortArray(List<E> list, IHandler<E,Short> handler)
E - 泛型list - 列表handler - 转换实现public static <E> long[] toLongArray(List<E> list, IHandler<E,Long> handler)
E - 泛型list - 列表handler - 转换实现public static <E> float[] toFloatArray(List<E> list, IHandler<E,Float> handler)
E - 泛型list - 列表handler - 转换实现public static <E> double[] toDoubleArray(List<E> list, IHandler<E,Double> handler)
E - 泛型list - 列表handler - 转换实现public static int[] newArray(int... arrays)
arrays - 数组元素public static boolean[] newArray(boolean... arrays)
arrays - 数组元素public static char[] newArray(char... arrays)
arrays - 数组元素public static short[] newArray(short... arrays)
arrays - 数组元素public static long[] newArray(long... arrays)
arrays - 数组元素public static byte[] newArray(byte... arrays)
arrays - 数组元素public static float[] newArray(float... arrays)
arrays - 数组元素public static double[] newArray(double... arrays)
arrays - 数组元素Copyright © 2024. All rights reserved.