public class PrimitiveArrays extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static Class |
BOOLEAN_ARRAY_CLASS |
static Class |
BYTE_ARRAY_CLASS |
static Class |
CHAR_ARRAY_CLASS |
static Class |
DOUBLE_ARRAY_CLASS |
static Class |
FLOAT_ARRAY_CLASS |
static Class |
INT_ARRAY_CLASS |
static Class |
LONG_ARRAY_CLASS |
static Class |
SHORT_ARRAY_CLASS |
| 构造器和说明 |
|---|
PrimitiveArrays() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
equals(boolean[] a,
boolean[] a2)
Returns true if the two specified arrays of booleans are
equal to one another.
|
static boolean |
equals(boolean[] a,
Boolean[] a2) |
static boolean |
equals(byte[] a,
byte[] a2)
Returns true if the two specified arrays of bytes are
equal to one another.
|
static boolean |
equals(byte[] a,
Byte[] a2) |
static boolean |
equals(char[] a,
char[] a2)
Returns true if the two specified arrays of chars are
equal to one another.
|
static boolean |
equals(char[] a,
Character[] a2) |
static boolean |
equals(double[] a,
double[] a2)
Returns true if the two specified arrays of doubles are
equal to one another.
|
static boolean |
equals(double[] a,
Double[] a2) |
static boolean |
equals(float[] a,
float[] a2)
Returns true if the two specified arrays of floats are
equal to one another.
|
static boolean |
equals(float[] a,
Float[] a2) |
static boolean |
equals(int[] a,
int[] a2)
Returns true if the two specified arrays of ints are
equal to one another.
|
static boolean |
equals(int[] a,
Integer[] a2) |
static boolean |
equals(long[] a,
long[] a2)
Returns true if the two specified arrays of longs are
equal to one another.
|
static boolean |
equals(long[] a,
Long[] a2) |
static boolean |
equals(Object[] a,
Object[] a2)
Returns true if the two specified arrays of Objects are
equal to one another.
|
static boolean |
equals(short[] a,
short[] a2)
Returns true if the two specified arrays of shorts are
equal to one another.
|
static boolean |
equals(short[] a,
Short[] a2) |
static boolean |
isPrimitiveArray(Class clazz) |
static boolean[] |
unwrap(Boolean[] values,
boolean resultNullable)
convert a Boolean[] to a boolean[]
|
static byte[] |
unwrap(Byte[] values,
boolean resultNullable)
convert a Byte[] to a byte[]
|
static char[] |
unwrap(Character[] values,
boolean resultNullable)
convert a Character[] to a char[]
|
static double[] |
unwrap(Double[] values,
boolean resultNullable)
convert a Double[] to a double[]
|
static float[] |
unwrap(Float[] values,
boolean resultNullable)
convert a Float[] to a float[]
|
static int[] |
unwrap(Integer[] values,
boolean resultNullable)
convert a Integer[] to a int[]
|
static long[] |
unwrap(Long[] values,
boolean resultNullable)
convert a Long[] to a long[]
|
static short[] |
unwrap(Short[] values,
boolean resultNullable)
convert a Short[] to a short[]
|
static Boolean[] |
wrap(boolean[] values,
boolean resultNullable)
convert a boolean[] to a Boolean[]
|
static Byte[] |
wrap(byte[] values,
boolean resultNullable)
convert a byte[] to a Byte[]
|
static Character[] |
wrap(char[] values,
boolean resultNullable)
convert a char[] to a Character[]
|
static Double[] |
wrap(double[] values,
boolean resultNullable)
convert a double[] to a Double[]
|
static Float[] |
wrap(float[] values,
boolean resultNullable)
convert a float[] to a Float[]
|
static Integer[] |
wrap(int[] values,
boolean resultNullable)
convert a int[] to a Integer[]
|
static Long[] |
wrap(long[] values,
boolean resultNullable)
convert a long[] to a Long[]
|
static <E> E[] |
wrap(Object o) |
static Short[] |
wrap(short[] values,
boolean resultNullable)
convert a short[] to a Short[]
|
public static final Class BYTE_ARRAY_CLASS
public static final Class SHORT_ARRAY_CLASS
public static final Class INT_ARRAY_CLASS
public static final Class LONG_ARRAY_CLASS
public static final Class FLOAT_ARRAY_CLASS
public static final Class DOUBLE_ARRAY_CLASS
public static final Class CHAR_ARRAY_CLASS
public static final Class BOOLEAN_ARRAY_CLASS
public static boolean isPrimitiveArray(Class clazz)
public static <E> E[] wrap(Object o)
public static Boolean[] wrap(@Nullable boolean[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static boolean[] unwrap(@Nullable Boolean[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static Character[] wrap(@Nullable char[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static char[] unwrap(@Nullable Character[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static Byte[] wrap(@Nullable byte[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static byte[] unwrap(@Nullable Byte[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static Short[] wrap(@Nullable short[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static short[] unwrap(@Nullable Short[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static Integer[] wrap(@Nullable int[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static int[] unwrap(@Nullable Integer[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static Float[] wrap(@Nullable float[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static float[] unwrap(@Nullable Float[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static Long[] wrap(@Nullable long[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static long[] unwrap(@Nullable Long[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static Double[] wrap(@Nullable double[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static double[] unwrap(@Nullable Double[] values, boolean resultNullable)
values - sourceresultNullable - whether return null when source is null or notpublic static boolean equals(long[] a,
long[] a2)
a - one array to be tested for equalitya2 - the other array to be tested for equalitypublic static boolean equals(long[] a,
Long[] a2)
public static boolean equals(int[] a,
int[] a2)
a - one array to be tested for equalitya2 - the other array to be tested for equalitypublic static boolean equals(int[] a,
Integer[] a2)
public static boolean equals(short[] a,
short[] a2)
a - one array to be tested for equalitya2 - the other array to be tested for equalitypublic static boolean equals(short[] a,
Short[] a2)
public static boolean equals(char[] a,
char[] a2)
a - one array to be tested for equalitya2 - the other array to be tested for equalitypublic static boolean equals(char[] a,
Character[] a2)
public static boolean equals(byte[] a,
byte[] a2)
a - one array to be tested for equalitya2 - the other array to be tested for equalitypublic static boolean equals(byte[] a,
Byte[] a2)
public static boolean equals(boolean[] a,
boolean[] a2)
a - one array to be tested for equalitya2 - the other array to be tested for equalitypublic static boolean equals(boolean[] a,
Boolean[] a2)
public static boolean equals(double[] a,
double[] a2)
Two doubles d1 and d2 are considered equal if:
new Double(d1).equals(new Double(d2))(Unlike the == operator, this method considers NaN equals to itself, and 0.0d unequal to -0.0d.)
a - one array to be tested for equalitya2 - the other array to be tested for equalityDouble.equals(Object)public static boolean equals(double[] a,
Double[] a2)
public static boolean equals(float[] a,
float[] a2)
Two floats f1 and f2 are considered equal if:
new Float(f1).equals(new Float(f2))(Unlike the == operator, this method considers NaN equals to itself, and 0.0f unequal to -0.0f.)
a - one array to be tested for equalitya2 - the other array to be tested for equalityFloat.equals(Object)public static boolean equals(float[] a,
Float[] a2)
public static boolean equals(Object[] a, Object[] a2)
a - one array to be tested for equalitya2 - the other array to be tested for equalityCopyright © 2021. All rights reserved.