The Array class provides static methods to dynamically create and access Java arrays.
Array permits widening conversions to occur during a get or set operation, but throws an IllegalArgumentException if a narrowing conversion would occur.
The Array class provides static methods to dynamically create and access Java arrays. Array permits widening conversions to occur during a get or set operation, but throws an IllegalArgumentException if a narrowing conversion would occur.
(*get array 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.
array - the array - java.lang.Object
index - the index - int
returns: the (possibly wrapped) value of the indexed component in
the specified array - java.lang.Object
throws: java.lang.NullPointerException - If the specified object is null
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. array - the array - `java.lang.Object` index - the index - `int` returns: the (possibly wrapped) value of the indexed component in the specified array - `java.lang.Object` throws: java.lang.NullPointerException - If the specified object is null
(*get-boolean? array index)
Returns the value of the indexed component in the specified array object, as a boolean.
array - the array - java.lang.Object
index - the index - int
returns: the value of the indexed component in the specified array - boolean
throws: java.lang.NullPointerException - If the specified object is null
Returns the value of the indexed component in the specified array object, as a boolean. array - the array - `java.lang.Object` index - the index - `int` returns: the value of the indexed component in the specified array - `boolean` throws: java.lang.NullPointerException - If the specified object is null
(*get-byte array index)
Returns the value of the indexed component in the specified array object, as a byte.
array - the array - java.lang.Object
index - the index - int
returns: the value of the indexed component in the specified array - byte
throws: java.lang.NullPointerException - If the specified object is null
Returns the value of the indexed component in the specified array object, as a byte. array - the array - `java.lang.Object` index - the index - `int` returns: the value of the indexed component in the specified array - `byte` throws: java.lang.NullPointerException - If the specified object is null
(*get-char array index)
Returns the value of the indexed component in the specified array object, as a char.
array - the array - java.lang.Object
index - the index - int
returns: the value of the indexed component in the specified array - char
throws: java.lang.NullPointerException - If the specified object is null
Returns the value of the indexed component in the specified array object, as a char. array - the array - `java.lang.Object` index - the index - `int` returns: the value of the indexed component in the specified array - `char` throws: java.lang.NullPointerException - If the specified object is null
(*get-double array index)
Returns the value of the indexed component in the specified array object, as a double.
array - the array - java.lang.Object
index - the index - int
returns: the value of the indexed component in the specified array - double
throws: java.lang.NullPointerException - If the specified object is null
Returns the value of the indexed component in the specified array object, as a double. array - the array - `java.lang.Object` index - the index - `int` returns: the value of the indexed component in the specified array - `double` throws: java.lang.NullPointerException - If the specified object is null
(*get-float array index)
Returns the value of the indexed component in the specified array object, as a float.
array - the array - java.lang.Object
index - the index - int
returns: the value of the indexed component in the specified array - float
throws: java.lang.NullPointerException - If the specified object is null
Returns the value of the indexed component in the specified array object, as a float. array - the array - `java.lang.Object` index - the index - `int` returns: the value of the indexed component in the specified array - `float` throws: java.lang.NullPointerException - If the specified object is null
(*get-int array index)
Returns the value of the indexed component in the specified array object, as an int.
array - the array - java.lang.Object
index - the index - int
returns: the value of the indexed component in the specified array - int
throws: java.lang.NullPointerException - If the specified object is null
Returns the value of the indexed component in the specified array object, as an int. array - the array - `java.lang.Object` index - the index - `int` returns: the value of the indexed component in the specified array - `int` throws: java.lang.NullPointerException - If the specified object is null
(*get-length array)
Returns the length of the specified array object, as an int.
array - the array - java.lang.Object
returns: the length of the array - int
throws: java.lang.IllegalArgumentException - if the object argument is not an array
Returns the length of the specified array object, as an int. array - the array - `java.lang.Object` returns: the length of the array - `int` throws: java.lang.IllegalArgumentException - if the object argument is not an array
(*get-long array index)
Returns the value of the indexed component in the specified array object, as a long.
array - the array - java.lang.Object
index - the index - int
returns: the value of the indexed component in the specified array - long
throws: java.lang.NullPointerException - If the specified object is null
Returns the value of the indexed component in the specified array object, as a long. array - the array - `java.lang.Object` index - the index - `int` returns: the value of the indexed component in the specified array - `long` throws: java.lang.NullPointerException - If the specified object is null
(*get-short array index)
Returns the value of the indexed component in the specified array object, as a short.
array - the array - java.lang.Object
index - the index - int
returns: the value of the indexed component in the specified array - short
throws: java.lang.NullPointerException - If the specified object is null
Returns the value of the indexed component in the specified array object, as a short. array - the array - `java.lang.Object` index - the index - `int` returns: the value of the indexed component in the specified array - `short` throws: java.lang.NullPointerException - If the specified object is null
(*new-instance component-type 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);
The number of dimensions of the new array must not exceed 255.
component-type - the Class object representing the component type of the new array - java.lang.Class
length - the length of the new array - int
returns: the new array - java.lang.Object
throws: java.lang.NullPointerException - if the specified componentType parameter is null
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); The number of dimensions of the new array must not exceed 255. component-type - the Class object representing the component type of the new array - `java.lang.Class` length - the length of the new array - `int` returns: the new array - `java.lang.Object` throws: java.lang.NullPointerException - if the specified componentType parameter is null
(*set array index 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.
array - the array - java.lang.Object
index - the index into the array - int
value - the new value of the indexed component - java.lang.Object
throws: java.lang.NullPointerException - If the specified object argument is null
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. array - the array - `java.lang.Object` index - the index into the array - `int` value - the new value of the indexed component - `java.lang.Object` throws: java.lang.NullPointerException - If the specified object argument is null
(*set-boolean array index z)
Sets the value of the indexed component of the specified array object to the specified boolean value.
array - the array - java.lang.Object
index - the index into the array - int
z - the new value of the indexed component - boolean
throws: java.lang.NullPointerException - If the specified object argument is null
Sets the value of the indexed component of the specified array object to the specified boolean value. array - the array - `java.lang.Object` index - the index into the array - `int` z - the new value of the indexed component - `boolean` throws: java.lang.NullPointerException - If the specified object argument is null
(*set-byte array index b)
Sets the value of the indexed component of the specified array object to the specified byte value.
array - the array - java.lang.Object
index - the index into the array - int
b - the new value of the indexed component - byte
throws: java.lang.NullPointerException - If the specified object argument is null
Sets the value of the indexed component of the specified array object to the specified byte value. array - the array - `java.lang.Object` index - the index into the array - `int` b - the new value of the indexed component - `byte` throws: java.lang.NullPointerException - If the specified object argument is null
(*set-char array index c)
Sets the value of the indexed component of the specified array object to the specified char value.
array - the array - java.lang.Object
index - the index into the array - int
c - the new value of the indexed component - char
throws: java.lang.NullPointerException - If the specified object argument is null
Sets the value of the indexed component of the specified array object to the specified char value. array - the array - `java.lang.Object` index - the index into the array - `int` c - the new value of the indexed component - `char` throws: java.lang.NullPointerException - If the specified object argument is null
(*set-double array index d)
Sets the value of the indexed component of the specified array object to the specified double value.
array - the array - java.lang.Object
index - the index into the array - int
d - the new value of the indexed component - double
throws: java.lang.NullPointerException - If the specified object argument is null
Sets the value of the indexed component of the specified array object to the specified double value. array - the array - `java.lang.Object` index - the index into the array - `int` d - the new value of the indexed component - `double` throws: java.lang.NullPointerException - If the specified object argument is null
(*set-float array index f)
Sets the value of the indexed component of the specified array object to the specified float value.
array - the array - java.lang.Object
index - the index into the array - int
f - the new value of the indexed component - float
throws: java.lang.NullPointerException - If the specified object argument is null
Sets the value of the indexed component of the specified array object to the specified float value. array - the array - `java.lang.Object` index - the index into the array - `int` f - the new value of the indexed component - `float` throws: java.lang.NullPointerException - If the specified object argument is null
(*set-int array index i)
Sets the value of the indexed component of the specified array object to the specified int value.
array - the array - java.lang.Object
index - the index into the array - int
i - the new value of the indexed component - int
throws: java.lang.NullPointerException - If the specified object argument is null
Sets the value of the indexed component of the specified array object to the specified int value. array - the array - `java.lang.Object` index - the index into the array - `int` i - the new value of the indexed component - `int` throws: java.lang.NullPointerException - If the specified object argument is null
(*set-long array index l)
Sets the value of the indexed component of the specified array object to the specified long value.
array - the array - java.lang.Object
index - the index into the array - int
l - the new value of the indexed component - long
throws: java.lang.NullPointerException - If the specified object argument is null
Sets the value of the indexed component of the specified array object to the specified long value. array - the array - `java.lang.Object` index - the index into the array - `int` l - the new value of the indexed component - `long` throws: java.lang.NullPointerException - If the specified object argument is null
(*set-short array index s)
Sets the value of the indexed component of the specified array object to the specified short value.
array - the array - java.lang.Object
index - the index into the array - int
s - the new value of the indexed component - short
throws: java.lang.NullPointerException - If the specified object argument is null
Sets the value of the indexed component of the specified array object to the specified short value. array - the array - `java.lang.Object` index - the index into the array - `int` s - the new value of the indexed component - `short` throws: java.lang.NullPointerException - If the specified object argument is null
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close