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

10
LINES

< > BotCompany Repo | #1024307 // filterParams - grab selected keys from params (key/value object array)

JavaX fragment (include)

static O[] filterParams(O[] params, O... keys) {
  Set set = asSet(keys);
  new L l;
  for (int i = 0; i < l(params); i += 2)
    if (contains(set, params[i])) {
      l.add(params[i]);
      l.add(params[i+1]);
    }
  ret asObjectArray(l);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1024307
Snippet name: filterParams - grab selected keys from params (key/value object array)
Eternal ID of this version: #1024307/1
Text MD5: a0a969a64d9e69aa2e448e844405a3ce
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-31 01:07:35
Source code size: 252 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 254 / 300
Referenced in: [show references]