Libraryless. Click here for Pure Java version (1713L/11K).
static Map<S, O> getFieldsAsMap_notNulls(Collection<S> fields, O o) { new LinkedHashMap<S, O> map; fOr (S field : fields) { O value = getOpt(o, field); if (value != null) map.put(field, value); } ret map; }
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: | #1024148 |
Snippet name: | getFieldsAsMap_notNulls - returns LinkedHashMap |
Eternal ID of this version: | #1024148/2 |
Text MD5: | 64235df258ad1e7976b8d628fe2af5ea |
Transpilation MD5: | 86323732eb224f1c1ade667ab1e071e9 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-23 14:03:17 |
Source code size: | 236 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 257 / 312 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |