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

3
LINES

< > BotCompany Repo | #1023164 // nullIfContainsKeysOtherThan

JavaX fragment (include)

static <A, B> Map<A, B> nullIfContainsKeysOtherThan(Map<A, B> map, Set<A> allowedKeys) {
  ret containsAnyKeyExcept(map, allowedKeys) ? null : map;
}

Author comment

Began life as a copy of #1023163

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023164
Snippet name: nullIfContainsKeysOtherThan
Eternal ID of this version: #1023164/1
Text MD5: d5ea7d69c6549b191d5c426f5fb737cd
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-15 21:38:31
Source code size: 151 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 245 / 281
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)