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

10
LINES

< > BotCompany Repo | #1025168 // paramsFromMap - selected key/value pairs as params. also returns nulls

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

Libraryless. Click here for Pure Java version (2102L/13K).

1  
static O[] paramsFromMap(Map map, O... keys) {
2  
  if (map == null || keys == null) null;
3  
  new L out;
4  
  for (O key : keys)
5  
    if (map.containsKey(key)) {
6  
      out.add(key);
7  
      out.add(map.get(key));
8  
    }
9  
  ret asArray(out);
10  
}

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: #1025168
Snippet name: paramsFromMap - selected key/value pairs as params. also returns nulls
Eternal ID of this version: #1025168/3
Text MD5: 8285285d229a73e60aeefaef5749747f
Transpilation MD5: da8cbaac65d8febc6db034ec9db5ad2e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-10 02:25:04
Source code size: 239 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 115 / 171
Version history: 2 change(s)
Referenced in: [show references]