MCPcopy
hub / github.com/ccxt/ccxt / IsInteger

Method IsInteger

java/lib/src/main/java/io/github/ccxt/Helpers.java:461–476  ·  view source on GitHub ↗
(Object value)

Source from the content-addressed store, hash-verified

459 }
460
461 public static boolean IsInteger(Object value) {
462 if (value == null) return false;
463
464 if (value instanceof Byte || value instanceof Short ||
465 value instanceof Integer || value instanceof Long ||
466 value instanceof java.util.concurrent.atomic.AtomicInteger ||
467 value instanceof java.util.concurrent.atomic.AtomicLong) {
468 return true;
469 }
470
471 if (value instanceof Float || value instanceof Double || value instanceof BigDecimal) {
472 BigDecimal d = new BigDecimal(String.valueOf(value));
473 return d.stripTrailingZeros().scale() <= 0;
474 }
475 return false;
476 }
477
478 public static Object mathMin(Object a, Object b) {
479 if (a == null || b == null) return null;

Callers 4

isEqualMethod · 0.95
multiplyMethod · 0.95
addElementToObjectMethod · 0.95
IsIntegerFunction · 0.80

Calls 2

scaleMethod · 0.80
stripTrailingZerosMethod · 0.80

Tested by

no test coverage detected