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

4
LINES

< > BotCompany Repo | #1035619 // toShort_enforce

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

Libraryless. Click here for Pure Java version (9160L/50K).

static short toShort_enforce(long l) {
  if (l != (short) l) fail("Too large for short: " + l);
  ret (short) l;
}

Author comment

Began life as a copy of #1025075

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035619
Snippet name: toShort_enforce
Eternal ID of this version: #1035619/1
Text MD5: b85efe85d4bf547732a63be4f1046293
Transpilation MD5: c1ecae5b207b66b7b8e9ae6bccb1a90c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-26 22:57:02
Source code size: 117 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 57 / 78
Referenced in: [show references]