public static final class Array.Int
extends java.lang.Object
Constructor and Description |
---|
Array.Int() |
Modifier and Type | Method and Description |
---|---|
static int |
arrayGet(int[] arr,
int i)
Access array element.
|
static int |
arrayLen(int[] arr)
Get array length.
|
static int[] |
arrayNew(int size)
Create an array of type int[].
|
static void |
arraySet(int[] arr,
int i,
int v)
Update array destructively.
|
public static final int arrayGet(int[] arr, int i)
Access array element.
arr
- the int arrayi
- the indexarr[i]
public static final int arrayLen(int[] arr)
Get array length.
arr
- the int arrayarr.length
public static final int[] arrayNew(int size)
Create an array of type int[].
size
- the size of the arraypublic static final void arraySet(int[] arr, int i, int v)
Update array destructively. This method is not pure!
arr
- the arrayi
- index into arrv
- new value to set at index i
Changes the passed array, therefore it is not pure. Because the return type
is void
there is no way to make the frege compiler believe it is pure.