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

21
LINES

< > BotCompany Repo | #1032630 // mapToMultiSet

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

Libraryless. Click here for Pure Java version (4817L/27K).

static <A, B> MultiSet<B> lambdaMapLike mapToMultiSet(IF1<A, B> f, A[] l) {
  new MultiSet<B> ms;
  if (l != null) for ping (A o : l)
    ms.add(f.get(o));
  ret ms;
}

static <A, B> MultiSet<B> lambdaMapLike mapToMultiSet(IF1<A, B> f, Iterable<A> l) {
  new MultiSet<B> ms;
  if (l != null) for ping (A o : l)
    ms.add(f.get(o));
  ret ms;
}

static <A, B> MultiSet<B> mapToMultiSet(A[] l, IF1<A, B> f) {
  ret mapToMultiSet(f, l);
}

static <A, B> MultiSet<B> mapToMultiSet(Iterable<A> l, IF1<A, B> f) {
  ret mapToMultiSet(f, l);
}

Author comment

Began life as a copy of #1003239

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032630
Snippet name: mapToMultiSet
Eternal ID of this version: #1032630/4
Text MD5: 6b1cdf3b28b02be361ebd3f6c170d3a1
Transpilation MD5: b490e4a2d8a16ecd73923965a0a2173e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-29 21:57:30
Source code size: 556 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 63 / 104
Version history: 3 change(s)
Referenced in: [show references]