// o is either a map already (string->object) or an arbitrary object, // in which case its fields are converted into a map. static Map<S, O> objectToMap_inOrder(O o) { if (o == null) null; if (o instanceof Map) ret (Map) o; new LinkedHashMap<S, O> map; for (S field : fieldsInOrder(o)) map.put(field, get(o, field)); ret map; }
Began life as a copy of #1002179
download show line numbers debug dex old transpilations
Travelled to 10 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1019760 |
| Snippet name: | objectToMap_inOrder |
| Eternal ID of this version: | #1019760/1 |
| Text MD5: | 2d7560d25ee4482114e8d61f3c4cbef8 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-11-25 02:24:33 |
| Source code size: | 350 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 541 / 566 |
| Referenced in: | [show references] |