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).

static O[] paramsFromMap(Map map, O... keys) {
  if (map == null || keys == null) null;
  new L out;
  for (O key : keys)
    if (map.containsKey(key)) {
      out.add(key);
      out.add(map.get(key));
    }
  ret asArray(out);
}

download  show line numbers  debug dex   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

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: 6 / 20
Version history: 2 change(s)
Referenced in: [show references]