1 | static Float getFloat(Map map, O key) { |
2 | ret map == null ? null : (Float) map.get(key); |
3 | } |
4 | |
5 | static Float getFloat(L l, int idx) { |
6 | ret (Float) get(l, idx); |
7 | } |
8 | |
9 | static Float getFloat(O o, O key) { |
10 | if (o instanceof Map) ret getFloat((Map) o, key); |
11 | if (key instanceof S) |
12 | ret (Float) getOpt(o, (S) key); |
13 | throw fail("Not a string key: " + getClassName(key)); |
14 | } |
Began life as a copy of #1001954
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007140 |
Snippet name: | getFloat - getOpt with cast to Float |
Eternal ID of this version: | #1007140/1 |
Text MD5: | 40bfaf1e0d61a20b0bbedb88e8a1ea88 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-03-06 14:46:12 |
Source code size: | 378 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 477 / 524 |
Referenced in: | [show references] |