Methods Summary |
---|
public static native java.lang.Object | get(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object. The value is automatically wrapped in an object
if it has a primitive type.
|
public static native boolean | getBoolean(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object, as a boolean .
|
public static native byte | getByte(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object, as a byte .
|
public static native char | getChar(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object, as a char .
|
public static native double | getDouble(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object, as a double .
|
public static native float | getFloat(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object, as a float .
|
public static native int | getInt(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object, as an int .
|
public static native int | getLength(java.lang.Object array)Returns the length of the specified array object, as an int .
|
public static native long | getLong(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object, as a long .
|
public static native short | getShort(java.lang.Object array, int index)Returns the value of the indexed component in the specified
array object, as a short .
|
private static native java.lang.Object | multiNewArray(java.lang.Class componentType, int[] dimensions)
|
private static native java.lang.Object | newArray(java.lang.Class componentType, int length)
|
public static java.lang.Object | newInstance(java.lang.Class componentType, int length)Creates a new array with the specified component type and
length.
Invoking this method is equivalent to creating an array
as follows:
int[] x = {length};
Array.newInstance(componentType, x);
return newArray(componentType, length);
|
public static java.lang.Object | newInstance(java.lang.Class componentType, int dimensions)Creates a new array
with the specified component type and dimensions.
If componentType
represents a non-array class or interface, the new array
has dimensions.length dimensions and
componentType as its component type. If
componentType represents an array class, the
number of dimensions of the new array is equal to the sum
of dimensions.length and the number of
dimensions of componentType . In this case, the
component type of the new array is the component type of
componentType .
The number of dimensions of the new array must not
exceed the number of array dimensions supported by the
implementation (typically 255).
return multiNewArray(componentType, dimensions);
|
public static native void | set(java.lang.Object array, int index, java.lang.Object value)Sets the value of the indexed component of the specified array
object to the specified new value. The new value is first
automatically unwrapped if the array has a primitive component
type.
|
public static native void | setBoolean(java.lang.Object array, int index, boolean z)Sets the value of the indexed component of the specified array
object to the specified boolean value.
|
public static native void | setByte(java.lang.Object array, int index, byte b)Sets the value of the indexed component of the specified array
object to the specified byte value.
|
public static native void | setChar(java.lang.Object array, int index, char c)Sets the value of the indexed component of the specified array
object to the specified char value.
|
public static native void | setDouble(java.lang.Object array, int index, double d)Sets the value of the indexed component of the specified array
object to the specified double value.
|
public static native void | setFloat(java.lang.Object array, int index, float f)Sets the value of the indexed component of the specified array
object to the specified float value.
|
public static native void | setInt(java.lang.Object array, int index, int i)Sets the value of the indexed component of the specified array
object to the specified int value.
|
public static native void | setLong(java.lang.Object array, int index, long l)Sets the value of the indexed component of the specified array
object to the specified long value.
|
public static native void | setShort(java.lang.Object array, int index, short s)Sets the value of the indexed component of the specified array
object to the specified short value.
|