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

10
LINES

< > BotCompany Repo | #1021414 // objectToMap_inOrder_withoutFields

JavaX fragment (include)

1  
// o is either a map already (string->object) or an arbitrary object,
2  
// in which case its fields are converted into a map.
3  
static Map<S, O> objectToMap_inOrder_withoutFields(O o, Collection<S> withoutFields) {
4  
  if (o == null) null;
5  
  if (o instanceof Map) ret (Map) o;
6  
  new LinkedHashMap<S, O> map;
7  
  for (S field : listWithoutSet(fieldsInOrder(o), withoutFields))
8  
    map.put(field, get(o, field));
9  
  ret map;
10  
}

Author comment

Began life as a copy of #1019760

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021414
Snippet name: objectToMap_inOrder_withoutFields
Eternal ID of this version: #1021414/1
Text MD5: 42f13a04ae14a2d64b6de71d3acc0d21
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-10 23:41:57
Source code size: 424 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 275 / 303
Referenced in: [show references]