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

12
LINES

< > BotCompany Repo | #1006564 // conceptFieldsInOrder - try to rearrange concept fields in source order

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

Libraryless. Click here for Pure Java version (20276L/123K).

1  
static L<S> conceptFieldsInOrder(Concept c) {
2  
  ret conceptFieldsInOrder(c.getClass());
3  
}
4  
5  
static L<S> conceptFieldsInOrder(Class<? extends Concept> c) {
6  
  S order = toStringOpt(getOpt(c, "_fieldOrder"));
7  
  Set<S> set = asTreeSet(conceptFields(c));
8  
  if (order == null) ret asList(set);
9  
  LS fields = listIntersectSet(splitAtSpace(order), set);
10  
  setAddAll(fields, set);
11  
  ret fields;
12  
}

Author comment

Began life as a copy of #1005294

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006564
Snippet name: conceptFieldsInOrder - try to rearrange concept fields in source order
Eternal ID of this version: #1006564/2
Text MD5: 9770e8f36d0ab3be588286105765edf1
Transpilation MD5: 06814ea2d70bc21115112b5ca4beb16c
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-03 08:39:42
Source code size: 397 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 599 / 752
Version history: 1 change(s)
Referenced in: [show references]