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)

static <A> A requiredPar(ThreadLocal<A> tl) {
  ret assertNotNull(optPar(tl));
}

sO requiredPar(O[] params, S name) {
  O o = optPar(params, name);
  if (o == null) fail("Need " + name);
  ret o;
}

sO mapMethodLike requiredPar(S name, O[] params) {
  ret requiredPar(params, name);
}

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: 293 / 305
Version history: 2 change(s)
Referenced in: [show references]