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

7
LINES

< > BotCompany Repo | #1031879 // mapSingle - apply function to value if function and value are not null (otherwise return null)

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

Transpiled version (2982L) is out of date.

static <A, B> B lambdaMapLike mapSingle(IF1<A, B> f, A a) {
  ret f == null || a == null ? null : f.get(a);
}

static <A, B> B lambdaMapLike mapSingle(A a, IF1<A, B> f) {
  ret mapSingle(f, a);
}

Author comment

Began life as a copy of #1031726

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1031879
Snippet name: mapSingle - apply function to value if function and value are not null (otherwise return null)
Eternal ID of this version: #1031879/3
Text MD5: 6107ca65baa971b1407b400388d0b5d9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-12 04:11:37
Source code size: 197 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 175 / 264
Version history: 2 change(s)
Referenced in: [show references]