Libraryless. Click here for Pure Java version (38L/1K).
static Class boxedToPrimitiveType(Class type) { if (type == Bool.class) return bool.class; if (type == Int.class) return int.class; if (type == Long.class) return long.class; if (type == Float.class) return float.class; if (type == Short.class) return short.class; if (type == Char.class) return char.class; if (type == Byte.class) return byte.class; if (type == Double.class) return double.class; null; }
Began life as a copy of #1017021
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034749 |
Snippet name: | boxedToPrimitiveType |
Eternal ID of this version: | #1034749/1 |
Text MD5: | 661ad79d2b7b6a4fcde2a7c449c26cd5 |
Transpilation MD5: | bc69dcbe610a86ac3648ec13ec7de197 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-08 02:51:32 |
Source code size: | 433 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 166 / 215 |
Referenced in: | [show references] |