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

15
LINES

< > BotCompany Repo | #1004689 // assertNempty (assert not empty)

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

Libraryless. Click here for Pure Java version (9976L/54K).

meta-for IntSize also as Cl, S {
  static <A extends IntSize> A assertNempty(S msg default "", A a) {
    if (empty(a)) fail(joinNemptiesWithColon(msg, str(a)));
    ret a;
  }
}

/*static <A> A assertNempty(A a) {
  ret assertNempty("empty", a);
}

static <A> A assertNempty(S msg, A a) {
  if (empty(a)) fail(msg + ": " + a);
  ret a;
}*/

Author comment

Began life as a copy of #1003364

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004689
Snippet name: assertNempty (assert not empty)
Eternal ID of this version: #1004689/8
Text MD5: 0917b3611a194eb9554ef0cbaf6cef80
Transpilation MD5: 3480eaadd1a165b7af3630fb806ebe8a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-01-17 22:16:42
Source code size: 354 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 514 / 764
Version history: 7 change(s)
Referenced in: [show references]