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

7
LINES

< > BotCompany Repo | #1026097 // mapFieldToField - synonym of fieldToFieldIndex

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

Libraryless. Click here for Pure Java version (2874L/17K).

static Map mapFieldToField(S fieldA, S fieldB, Iterable l) {
  ret fieldToFieldIndex(fieldA, fieldB, l);
}

static <A, B> Map<A, B> mapFieldToField(S fieldA, Class<A> typeA, S fieldB, Class<B> typeB, Iterable l) {
  ret filterMap(mapFieldToField(fieldA, fieldB, l), (k, v) -> isInstanceX(typeA, k) && isInstance(typeB, k));
}

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: #1026097
Snippet name: mapFieldToField - synonym of fieldToFieldIndex
Eternal ID of this version: #1026097/2
Text MD5: 9ea34ccafcbb0bb8d85e427ed5844495
Transpilation MD5: 630e956e4ecea9b1726f5bd36359f081
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-14 16:12:17
Source code size: 331 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 189 / 259
Version history: 1 change(s)
Referenced in: [show references]