Libraryless. Click here for Pure Java version (9429L/52K).
1 | enum HoldSide { |
2 | SHORT, LONG; |
3 | |
4 | static HoldSide fromInt(double direction) { |
5 | if (direction > 0) ret LONG; |
6 | if (direction < 0) ret SHORT; |
7 | fail("direction 0"); |
8 | } |
9 | |
10 | bool isLong() { ret this == LONG; } |
11 | bool isShort() { ret this == SHORT; } |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1036210 |
Snippet name: | HoldSide |
Eternal ID of this version: | #1036210/4 |
Text MD5: | bc30951be333c68aa71043eff69b4bb6 |
Transpilation MD5: | 185d2243f193f9d97c5701174507437a |
Author: | stefan |
Category: | javax / trading |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-10-26 05:10:07 |
Source code size: | 267 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 134 / 217 |
Version history: | 3 change(s) |
Referenced in: | [show references] |