Modifier and Type | Field and Description |
---|---|
byte |
j
the primitive byte value boxed by this instance
|
private static Box.Byte[] |
small
a cache for small ints
|
Modifier | Constructor and Description |
---|---|
private |
Box.Byte(int c) |
Modifier and Type | Method and Description |
---|---|
int |
_c()
The int value.
|
static int |
arrayGet(byte[] arr,
int i)
Access array element.
|
static int |
arrayLen(byte[] arr)
Get array length.
|
static byte[] |
arrayNew(int size)
Create an array of type byte[].
|
static void |
arraySet(byte[] arr,
int i,
int v)
Update array destructively.
|
static byte[] |
arrayUpd(byte[] arr,
int i,
int v)
Update array nondestructively.
|
static Box.Byte |
mk(int c)
box an int value
|
java.lang.String |
toString() |
_e, _u, _v, constructor
private static final Box.Byte[] small
public final byte j
public static final Box.Byte 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 Byte = 0 | 1 | 2 ... | -maxint | ... | -1
public java.lang.String toString()
toString
in class java.lang.Object
public static final int arrayGet(byte[] arr, int i)
Access array element.
arr
- the int arrayi
- the indexarr[i]
public static final int arrayLen(byte[] arr)
Get array length.
arr
- the byte arrayarr.length
public static final byte[] arrayNew(int size)
Create an array of type byte[].
size
- the size of the arraypublic static final byte[] arrayUpd(byte[] 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(byte[] 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.