Modifier and Type | Field and Description |
---|---|
short |
j
the primitive int value boxed by this instance
|
private static Box.Short[] |
small
a cache for small ints
|
Modifier | Constructor and Description |
---|---|
private |
Box.Short(short c) |
Modifier and Type | Method and Description |
---|---|
int |
_c()
The int value.
|
static short |
arrayGet(short[] arr,
int i)
Access array element.
|
static int |
arrayLen(short[] arr)
Get array length.
|
static short[] |
arrayNew(int size)
Create an array of type short[].
|
static void |
arraySet(short[] arr,
int i,
short v)
Update array destructively.
|
static short[] |
arrayUpd(short[] arr,
int i,
short v)
Update array nondestructively.
|
static Box.Short |
mk(short c)
box a short value
|
java.lang.String |
toString() |
_e, _u, _v, constructor
private static final Box.Short[] small
public final short j
public static final Box.Short mk(short c)
box a short value
public final int _c()
The int value. This is so that one can imagine that Short is
declared as data Short = 0 | 1 | 2 ... | -maxshort | ... | -1
public java.lang.String toString()
toString
in class java.lang.Object
public static final short arrayGet(short[] arr, int i)
Access array element.
arr
- the int arrayi
- the indexarr[i]
public static final int arrayLen(short[] arr)
Get array length.
arr
- the int arrayarr.length
public static final short[] arrayNew(int size)
Create an array of type short[].
size
- the size of the arraypublic static final short[] arrayUpd(short[] arr, int i, short v)
Update array nondestructively.
arr
- the arrayi
- index into arrv
- new value to set at index ipublic static final void arraySet(short[] arr, int i, short 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.