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

6
LINES

< > BotCompany Repo | #1029832 // sortByTransformedMapKey_alphaNum

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

Libraryless. Click here for Pure Java version (2659L/18K).

static <B, C, A extends Map<B, C>> L<A> lambdaMapLike sortByTransformedMapKey_alphaNum(IF1<C, S> transform, Iterable<A> c, B key) {
  L<A> l = cloneList(c);
  sort(l, (a, b) ->
    cmpAlphaNum(transform.get(mapGet(a, key)), transform.get(mapGet(b, key))));
  ret l;
}

Author comment

Began life as a copy of #1029831

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029832
Snippet name: sortByTransformedMapKey_alphaNum
Eternal ID of this version: #1029832/1
Text MD5: 27b41cf9e2e242c489a46f12594b8fdb
Transpilation MD5: e24490645d8757edac6a686c05cd79f5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-21 13:17:56
Source code size: 272 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 191 / 276
Referenced in: [show references]