Modifier and Type | Field and Description |
---|---|
int |
j
the primitive int value boxed by this instance
|
private static Box.Int[] |
small
a cache for small ints
|
Modifier | Constructor and Description |
---|---|
private |
Box.Int(int c) |
Modifier and Type | Method and Description |
---|---|
int |
_c()
The int value.
|
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.
|
static int[] |
arrayUpd(int[] arr,
int i,
int v)
Update array nondestructively.
|
static Box.Int |
mk(int c)
box an int value
|
java.lang.String |
toString() |
_e, _u, _v, constructor
private static final Box.Int[] small
public final int j
public static final Box.Int mk(int c)
box an int value
public final int _c()
The int value. This is so that one can imagine that Int is
declared as data Int = 0 | 1 | 2 ... | -maxint | ... | -1
public java.lang.String toString()
toString
in class java.lang.Object
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 int[] arrayUpd(int[] arr, int i, int v)
Update array nondestructively.
arr
- the arrayi
- index into arrv
- new value to set at index ipublic 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.