Libraryless. Click here for Pure Java version (3150L/18K).
1 | static <A extends Iterable> A pnl(S prefix default "", A l) { |
2 | printNumberedLines(prefix, l); |
3 | ret l; |
4 | } |
5 | |
6 | static <A> A[] pnl(S prefix default "", A[] l) { |
7 | printNumberedLines(prefix, l); |
8 | ret l; |
9 | } |
10 | |
11 | static <A extends Map> A pnl(A map) { |
12 | printNumberedLines(map); |
13 | ret map; |
14 | } |
15 | |
16 | static <A extends Map> A pnl(S prefix, A map) { |
17 | printNumberedLines(prefix, map); |
18 | ret map; |
19 | } |
20 | |
21 | sS pnl(S s) { |
22 | printNumberedLines(lines(s)); |
23 | ret s; |
24 | } |
25 | |
26 | ifclass MultiSet |
27 | static <A> MultiSet<A> pnl(MultiSet<A> ms) { |
28 | pnl(ms == null ? null : ms.asMap()); |
29 | ret ms; |
30 | } |
31 | endif |
32 | |
33 | ifclass MultiMap |
34 | static <A, B> MultiMap<A, B> pnl(MultiMap<A, B> mm) { |
35 | pnl(mm == null ? null : mm.asMap()); |
36 | ret mm; |
37 | } |
38 | endif |
Began life as a copy of #1006335
download show line numbers debug dex old transpilations
Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jcllbfdqhrgy, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, wnsclhtenguj, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1008448 |
Snippet name: | pnl - synonym of printNumberedLines |
Eternal ID of this version: | #1008448/25 |
Text MD5: | acb8de65cb0d76c29d13ece470a801ce |
Transpilation MD5: | 84e4f5ce460743c6d8fc08895a84cb4a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-19 21:02:00 |
Source code size: | 719 bytes / 38 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 824 / 1107 |
Version history: | 24 change(s) |
Referenced in: | [show references] |