Libraryless. Click here for Pure Java version (51L/1K).
1 | static <A> L<A> replaceElementInSubList(L<A> l, int from, int to, A a, A b) { |
2 | for (int i = from; i < to; i++) |
3 | if (eq(l.get(i), a)) |
4 | l.set(i, b); |
5 | ret l; |
6 | } |
Began life as a copy of #1018718
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033291 |
Snippet name: | replaceElementInSubList |
Eternal ID of this version: | #1033291/1 |
Text MD5: | a33b733a3b2c29a753553d9ccdbdb97f |
Transpilation MD5: | 6a9ccd6005af04399a8c37db8bc91cf7 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-18 11:18:20 |
Source code size: | 171 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 168 / 229 |
Referenced in: | [show references] |