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

13
LINES

< > BotCompany Repo | #1022406 // requiredPar - required parameter from ThreadLocal or params

JavaX fragment (include)

1  
static <A> A requiredPar(ThreadLocal<A> tl) {
2  
  ret assertNotNull(optPar(tl));
3  
}
4  
5  
sO requiredPar(O[] params, S name) {
6  
  O o = optPar(params, name);
7  
  if (o == null) fail("Need " + name);
8  
  ret o;
9  
}
10  
11  
sO mapMethodLike requiredPar(S name, O[] params) {
12  
  ret requiredPar(params, name);
13  
}

Author comment

Began life as a copy of #1006679

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1022406
Snippet name: requiredPar - required parameter from ThreadLocal or params
Eternal ID of this version: #1022406/3
Text MD5: f4a3ebae543b5c76013e33dd27f638a1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-16 22:05:42
Source code size: 297 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 294 / 307
Version history: 2 change(s)
Referenced in: [show references]