MCPcopy Create free account
hub / github.com/Var3D/var3dframe / toLong

Method toLong

core/src/core/java/var3d/net/center/json/JSON.java:72–84  ·  view source on GitHub ↗
(Object value)

Source from the content-addressed store, hash-verified

70 }
71
72 static Long toLong(Object value) {
73 if (value instanceof Long) {
74 return (Long) value;
75 } else if (value instanceof Number) {
76 return ((Number) value).longValue();
77 } else if (value instanceof String) {
78 try {
79 return (long) Double.parseDouble((String) value);
80 } catch (NumberFormatException ignored) {
81 }
82 }
83 return null;
84 }
85
86 static String toString(Object value) {
87 if (value instanceof String) {

Callers 4

getLongMethod · 0.95
optLongMethod · 0.95
getLongMethod · 0.95
optLongMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected