Libraryless. Click here for Pure Java version (10025L/55K).
1 | static L<Byte> wrapByteArrayAsList (byte[] l) {
|
2 | ret new RandomAccessAbstractList<Byte>() {
|
3 | public int size() { ret l.length; }
|
4 | public Byte get(int i) { ret l[i]; }
|
5 | public Byte set(int i, Byte val) {
|
6 | Byte a = l[i]; |
7 | l[i] = val; |
8 | ret a; |
9 | } |
10 | }; |
11 | } |
Began life as a copy of #1029408
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035682 |
| Snippet name: | wrapByteArrayAsList - mutable |
| Eternal ID of this version: | #1035682/1 |
| Text MD5: | d74ce1ce48aeffe95f1885a6fbc1b7e8 |
| Transpilation MD5: | 366e77eb7c0aa365715e9a2a848a3ae0 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-07-06 20:22:35 |
| Source code size: | 287 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 357 / 446 |
| Referenced in: | [show references] |