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

12
LINES

< > BotCompany Repo | #1030144 // collectNemptyStrings

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

Libraryless. Click here for Pure Java version (2518L/16K).

static LS collectNemptyStrings(Iterable c, S field) {
  ret collectNemptyStrings(field, c);
}

static LS mapMethodLike collectNemptyStrings(S field, Iterable c) {
  new LS l;
  if (c != null) for (O a : c) {
    S x = cast getOpt(a, field);
    if (nempty(x)) l.add(x);
  }
  ret l;
}

Author comment

Began life as a copy of #1021464

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030144
Snippet name: collectNemptyStrings
Eternal ID of this version: #1030144/3
Text MD5: 6fbf56fad0ef1920b10f4c8700a31af0
Transpilation MD5: cba35c096f1e55ac038391ec6e1f8619
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-11 14:11:20
Source code size: 295 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 233 / 296
Version history: 2 change(s)
Referenced in: [show references]