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


< > BotCompany Repo | #1007227 - mapPut - put into map if key & value are not null

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

Libraryless. Click here for Pure Java version (30L/1K).

static <A, B> void mapPut(Map<A, B> map, A key, B value) {
  if (map != null && key != null && value != null) map.put(key, value);

ifclass Pair
static <A, B> void mapPut(Map<A, B> map, Pair<A, B> p) {
  if (map != null && p != null) map.put(p.a, p.b);

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007227
Snippet name: mapPut - put into map if key & value are not null
Eternal ID of this version: #1007227/3
Text MD5: 5ddcc7447445f226b4eb71e91c850de6
Transpilation MD5: 24234ff0e601e07c85894d240c766e26
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-23 20:05:09
Source code size: 270 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 428 / 479
Version history: 2 change(s)
Referenced in: [show references]