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

21
LINES

< > BotCompany Repo | #1002348 - nempty - not empty

JavaX fragment (include)

static boolean nempty(Collection c) {
  ret !empty(c);
}

static boolean nempty(CharSequence s) {
  ret !empty(s);
}

static boolean nempty(O[] o) { ret !empty(o); }
static boolean nempty(byte[] o) { ret !empty(o); }
static boolean nempty(int[] o) { ret !empty(o); }

static boolean nempty(Map m) {
  ret !empty(m);
}

static boolean nempty(Iterator i) {
  ret i != null && i.hasNext();
}

static bool nempty(O o) { ret !empty(o); }

Author comment

Began life as a copy of #1002108

download  show line numbers  debug dex   

Travelled to 13 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, tslmcundralx, tvejysmllsmz, whxojlpjdney

No comments. add comment

Snippet ID: #1002348
Snippet name: nempty - not empty
Eternal ID of this version: #1002348/5
Text MD5: 98053425292a403792d6dc410f13e4d2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-02 13:03:41
Source code size: 452 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 498 / 4487
Version history: 4 change(s)
Referenced in: [show references]