Array (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
static [Object](../../../java/lang/Object.html "class in java.lang")
[get](../../../java/lang/reflect/Array.html#get-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object.
static boolean
[getBoolean](../../../java/lang/reflect/Array.html#getBoolean-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object, as a boolean
.
static byte
[getByte](../../../java/lang/reflect/Array.html#getByte-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object, as a byte
.
static char
[getChar](../../../java/lang/reflect/Array.html#getChar-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object, as a char
.
static double
[getDouble](../../../java/lang/reflect/Array.html#getDouble-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object, as a double
.
static float
[getFloat](../../../java/lang/reflect/Array.html#getFloat-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object, as a float
.
static int
[getInt](../../../java/lang/reflect/Array.html#getInt-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object, as an int
.
static int
[getLength](../../../java/lang/reflect/Array.html#getLength-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") array)
Returns the length of the specified array object, as an int
.
static long
[getLong](../../../java/lang/reflect/Array.html#getLong-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object, as a long
.
static short
[getShort](../../../java/lang/reflect/Array.html#getShort-java.lang.Object-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index)
Returns the value of the indexed component in the specified array object, as a short
.
static [Object](../../../java/lang/Object.html "class in java.lang")
[newInstance](../../../java/lang/reflect/Array.html#newInstance-java.lang.Class-int...-)([Class](../../../java/lang/Class.html "class in java.lang")<?> componentType, int... dimensions)
Creates a new array with the specified component type and dimensions.
static [Object](../../../java/lang/Object.html "class in java.lang")
[newInstance](../../../java/lang/reflect/Array.html#newInstance-java.lang.Class-int-)([Class](../../../java/lang/Class.html "class in java.lang")<?> componentType, int length)
Creates a new array with the specified component type and length.
static void
[set](../../../java/lang/reflect/Array.html#set-java.lang.Object-int-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index,[Object](../../../java/lang/Object.html "class in java.lang") value)
Sets the value of the indexed component of the specified array object to the specified new value.
static void
[setBoolean](../../../java/lang/reflect/Array.html#setBoolean-java.lang.Object-int-boolean-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index, boolean z)
Sets the value of the indexed component of the specified array object to the specified boolean
value.
static void
[setByte](../../../java/lang/reflect/Array.html#setByte-java.lang.Object-int-byte-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index, byte b)
Sets the value of the indexed component of the specified array object to the specified byte
value.
static void
[setChar](../../../java/lang/reflect/Array.html#setChar-java.lang.Object-int-char-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index, char c)
Sets the value of the indexed component of the specified array object to the specified char
value.
static void
[setDouble](../../../java/lang/reflect/Array.html#setDouble-java.lang.Object-int-double-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index, double d)
Sets the value of the indexed component of the specified array object to the specified double
value.
static void
[setFloat](../../../java/lang/reflect/Array.html#setFloat-java.lang.Object-int-float-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index, float f)
Sets the value of the indexed component of the specified array object to the specified float
value.
static void
[setInt](../../../java/lang/reflect/Array.html#setInt-java.lang.Object-int-int-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index, int i)
Sets the value of the indexed component of the specified array object to the specified int
value.
static void
[setLong](../../../java/lang/reflect/Array.html#setLong-java.lang.Object-int-long-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index, long l)
Sets the value of the indexed component of the specified array object to the specified long
value.
static void
[setShort](../../../java/lang/reflect/Array.html#setShort-java.lang.Object-int-short-)([Object](../../../java/lang/Object.html "class in java.lang") array, int index, short s)
Sets the value of the indexed component of the specified array object to the specified short
value.