Libraryless. Click here for Pure Java version (38L/1K).
1 | static Class boxedToPrimitiveType(Class type) {
|
2 | if (type == Bool.class) return bool.class; |
3 | if (type == Int.class) return int.class; |
4 | if (type == Long.class) return long.class; |
5 | if (type == Float.class) return float.class; |
6 | if (type == Short.class) return short.class; |
7 | if (type == Char.class) return char.class; |
8 | if (type == Byte.class) return byte.class; |
9 | if (type == Double.class) return double.class; |
10 | null; |
11 | } |
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: | 394 / 487 |
| Referenced in: | [show references] |