| 构造器 | 说明 |
|---|---|
O() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static <T> T[] |
array0(Class<T[]> tsClass) |
Creates a new empty array with the specified array class type.
|
static <T> T[] |
arrayFillM(Class<T[]> tsClass,
int length,
T t) |
Creates a new array with the specified array class type and length,
and assigns the t object reference to each element of array.
|
static <T> T[] |
arrayFillN(Class<T> tClass,
int length,
T t) |
Creates a new array with the specified class type and length,
and assigns the t object reference to each element of array.
|
static <T> T[] |
arrayM(Class<T[]> tsClass,
int length) |
Creates a new array with the specified array class type and length.
|
static <T> T[] |
arrayN(Class<T> tClass,
int length) |
Creates a new array with the specified class type and length.
|
static <T> T[] |
arrayO(Class<T> tClass) |
Creates a new empty array with the specified class type.
|
static List<Throwable> |
causeTrace(Throwable throwable) |
|
static int |
compare(Number n1,
Number n2) |
Compares two Numbers
|
static <R> R |
firstNonNull(R... rs) |
Gets the first object that is not
null. |
static int |
indexOfMax(byte[] bs) |
Getting index of maximum value in
byte[] |
static int |
indexOfMax(char[] cs) |
Getting index of maximum value in
char[] |
static int |
indexOfMax(double[] ds) |
Getting index of maximum value in
double[] (Double.NaN will be ignored) |
static int |
indexOfMax(float[] fs) |
Getting index of maximum value in
float[] (Float.NaN will be ignored) |
static int |
indexOfMax(int[] is) |
Getting index of maximum value in
int[] |
static int |
indexOfMax(long[] ls) |
Getting index of maximum value in
long[] |
static int |
indexOfMax(short[] ss) |
Getting index of maximum value in
short[] |
static int |
indexOfMax(Number[] numbers) |
Getting index of maximum value in
Number array. |
static int |
indexOfMin(byte[] bs) |
Getting index of minimum value in
byte[] |
static int |
indexOfMin(char[] cs) |
Getting index of minimum value in
char[] |
static int |
indexOfMin(double[] ds) |
Getting index of minimum value in
double[] (Double.NaN will be ignored) |
static int |
indexOfMin(float[] fs) |
Getting index of minimum value in
float[] (Float.NaN will be ignored) |
static int |
indexOfMin(int[] is) |
Getting index of minimum value in
int[] |
static int |
indexOfMin(long[] ls) |
Getting index of minimum value in
long[] |
static int |
indexOfMin(short[] ss) |
Getting index of minimum value in
short[] |
static int |
indexOfMin(Number[] numbers) |
Getting index of minimum value in
Number array. |
static boolean |
isDouble(Number number) |
|
static boolean |
isFloat(Number number) |
|
static boolean |
isInfinityOrNaN(Number number) |
Returns
true if this Number value is
a Not-a-Number (NaN) or Infinite, false otherwise. |
static boolean |
isInteger(Number number) |
Returns
true if this Number value is Byte or Short or Integer
or AtomicInteger or isLong(Number), false otherwise. |
static boolean |
isLong(Number number) |
Returns
true if this Number value is Long or AtomicLong or LongAdder
or LongAccumulator, false otherwise. |
static BigDecimal |
toBigDecimal(Number number) |
Convert
Number to BigDecimal |
public static <T> T[] array0(Class<T[]> tsClass)
T - array typetsClass - array typepublic static <T> T[] arrayO(Class<T> tClass)
T - array typetClass - array typepublic static <T> T[] arrayM(Class<T[]> tsClass, int length)
T - array typetsClass - array typelength - array lengthpublic static <T> T[] arrayN(Class<T> tClass, int length)
T - array typetClass - array typelength - array lengthpublic static <T> T[] arrayFillM(Class<T[]> tsClass, int length, T t)
T - array typetsClass - array typelength - array lengtht - t objectpublic static <T> T[] arrayFillN(Class<T> tClass, int length, T t)
T - array typetClass - array typelength - array lengtht - t objectpublic static List<Throwable> causeTrace(Throwable throwable)
throwable - Throwablethrowable and throwable's all causes@SafeVarargs public static <R> R firstNonNull(R... rs)
null. null 的值R - return typers - object arraynull objectpublic static int indexOfMax(byte[] bs)
byte[]bs - byte[]-1 if not found.public static int indexOfMax(short[] ss)
short[]ss - short[]-1 if not found.public static int indexOfMax(char[] cs)
char[]cs - char[]-1 if not found.public static int indexOfMax(int[] is)
int[]is - int[]-1 if not found.public static int indexOfMax(long[] ls)
long[]ls - long[]-1 if not found.public static int indexOfMax(float[] fs)
float[] (Float.NaN will be ignored)fs - float[]-1 if not found.public static int indexOfMax(double[] ds)
double[] (Double.NaN will be ignored)ds - double[]-1 if not found.public static int indexOfMin(byte[] bs)
byte[]bs - byte[]-1 if not found.public static int indexOfMin(short[] ss)
short[]ss - short[]-1 if not found.public static int indexOfMin(char[] cs)
char[]cs - char[]-1 if not found.public static int indexOfMin(int[] is)
int[]is - int[]-1 if not found.public static int indexOfMin(long[] ls)
long[]ls - long[]-1 if not found.public static int indexOfMin(float[] fs)
float[] (Float.NaN will be ignored)fs - float[]-1 if not found.public static int indexOfMin(double[] ds)
double[] (Double.NaN will be ignored)ds - double[]-1 if not found.public static boolean isDouble(Number number)
number - numbertrue if this Number value is Double or DoubleAdder or DoubleAccumulator, false otherwise.public static boolean isFloat(Number number)
number - numbertrue if this Number value is Float or isDouble(Number), false otherwise.public static boolean isLong(Number number)
true if this Number value is Long or AtomicLong or LongAdder
or LongAccumulator, false otherwise.number - numbertrue if this Number value is Long or AtomicLong or LongAdder
or LongAccumulator, false otherwise.public static boolean isInteger(Number number)
true if this Number value is Byte or Short or Integer
or AtomicInteger or isLong(Number), false otherwise.number - numbertrue if this Number value is Byte or Short or Integer
or AtomicInteger or isLong(Number), false otherwise.public static boolean isInfinityOrNaN(Number number)
true if this Number value is
a Not-a-Number (NaN) or Infinite, false otherwise.number - numbertrue if this Number value is
a Not-a-Number (NaN) or Infinite, false otherwise.public static BigDecimal toBigDecimal(Number number)
Number to BigDecimalnumber - numberpublic static int compare(Number n1, Number n2)
n1 - number1n2 - number2-2: one of the two numbers is null;
-1: number1 less than number2;
0: number1 equal number2;
1: number1 greater than number2.
public static int indexOfMax(Number[] numbers)
Number array.numbers - Number array-1 if not found.Copyright © 2023 io-fairy. All rights reserved.