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

9
LINES

< > BotCompany Repo | #1029841 // onlyNonNullParams

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

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

static O[] onlyNonNullParams(O... params) {
  new L out;
  for (int i = 0; i+1 < l(params); i += 2)
    if (params[i] != null && params[i+1] != null) {
      out.add(params[i]);
      out.add(params[i+1]);
    }
  ret toObjectArray(out);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1029841
Snippet name: onlyNonNullParams
Eternal ID of this version: #1029841/2
Text MD5: 1623c80467ab26714b4439f277cd0080
Transpilation MD5: 87afae250760eb274bef7bb88f21ee51
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-22 12:18:29
Source code size: 247 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 115 / 188
Version history: 1 change(s)
Referenced in: [show references]