public final class Array
extends Object
Replaces java.lang.reflect.Array for better performance.
Basically the java.lang.reflect version uses native methods which are quite slow.
-
Method Summary
static boolean
static byte
static char
static double
static float
static int
static int
static long
static short
static void
static void
static void
static void
static void
static void
static void
static void
static void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
newInstance
public static Object newInstance(Class<?> componentType,
int length)
-
newInstance
public static Object newInstance(Class<?> componentType,
int[] dimensions)
-
getLength
public static int getLength(Object array)
-
-
getBoolean
public static boolean getBoolean(Object array,
int index)
-
getByte
public static byte getByte(Object array,
int index)
-
getChar
public static char getChar(Object array,
int index)
-
getShort
public static short getShort(Object array,
int index)
-
getInt
public static int getInt(Object array,
int index)
-
getLong
public static long getLong(Object array,
int index)
-
getFloat
public static float getFloat(Object array,
int index)
-
getDouble
public static double getDouble(Object array,
int index)
-
set
public static void set(Object array,
int index,
Object value)
-
setBoolean
public static void setBoolean(Object array,
int index,
boolean value)
-
setByte
public static void setByte(Object array,
int index,
byte value)
-
setChar
public static void setChar(Object array,
int index,
char value)
-
setShort
public static void setShort(Object array,
int index,
short value)
-
setInt
public static void setInt(Object array,
int index,
int value)
-
setLong
public static void setLong(Object array,
int index,
long value)
-
setFloat
public static void setFloat(Object array,
int index,
float value)
-
setDouble
public static void setDouble(Object array,
int index,
double value)