Array (Java Platform SE 7 ) (original) (raw)

Modifier and Type

Method and Description

static [Object](../../../java/lang/Object.html "class in java.lang")

**[get](../../../java/lang/reflect/Array.html#get%28java.lang.Object,%20int%29)**([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%28java.lang.Object,%20int%29)**([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%28java.lang.Object,%20int%29)**([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%28java.lang.Object,%20int%29)**([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%28java.lang.Object,%20int%29)**([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%28java.lang.Object,%20int%29)**([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%28java.lang.Object,%20int%29)**([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%28java.lang.Object%29)**([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%28java.lang.Object,%20int%29)**([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%28java.lang.Object,%20int%29)**([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%28java.lang.Class,%20int...%29)**([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%28java.lang.Class,%20int%29)**([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%28java.lang.Object,%20int,%20java.lang.Object%29)**([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%28java.lang.Object,%20int,%20boolean%29)**([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%28java.lang.Object,%20int,%20byte%29)**([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%28java.lang.Object,%20int,%20char%29)**([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%28java.lang.Object,%20int,%20double%29)**([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%28java.lang.Object,%20int,%20float%29)**([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%28java.lang.Object,%20int,%20int%29)**([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%28java.lang.Object,%20int,%20long%29)**([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%28java.lang.Object,%20int,%20short%29)**([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.