Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

38
LINES

< > BotCompany Repo | #1008448 // pnl - synonym of printNumberedLines

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3150L/18K).

static <A extends Iterable> A pnl(S prefix default "", A l) {
  printNumberedLines(prefix, l);
  ret l;
}

static <A> A[] pnl(S prefix default "", A[] l) {
  printNumberedLines(prefix, l);
  ret l;
}

static <A extends Map> A pnl(A map) {
  printNumberedLines(map);
  ret map;
}

static <A extends Map> A pnl(S prefix, A map) {
  printNumberedLines(prefix, map);
  ret map;
}

sS pnl(S s) {
  printNumberedLines(lines(s));
  ret s;
}

ifclass MultiSet
static <A> MultiSet<A> pnl(MultiSet<A> ms) {
  pnl(ms == null ? null : ms.asMap());
  ret ms;
}
endif

ifclass MultiMap
static <A, B> MultiMap<A, B> pnl(MultiMap<A, B> mm) {
  pnl(mm == null ? null : mm.asMap());
  ret mm;
}
endif

Author comment

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: 721 / 978
Version history: 24 change(s)
Referenced in: [show references]