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

13
LINES

< > BotCompany Repo | #1035079 // parsePrimitiveType

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

Libraryless. Click here for Pure Java version (55L/1K).

static Map<S, Class> parsePrimitiveType_map = litmap(
  "int" := int.class,
  "char" := char.class,
  "byte" := byte.class,
  "short" := short.class,
  "long" := long.class,
  "float" := float.class,
  "double" := double.class,
  "bool" := bool.class);

static Class parsePrimitiveType(S s) {
  ret parsePrimitiveType_map.get(s);
}

Author comment

Began life as a copy of #1029184

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035079
Snippet name: parsePrimitiveType
Eternal ID of this version: #1035079/3
Text MD5: 5a5559107ea00b73516dedbe1aa89ad0
Transpilation MD5: db928f8426ed3e4e306dc7f006d0ab32
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-29 17:32:56
Source code size: 343 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 79 / 113
Version history: 2 change(s)
Referenced in: [show references]