MCPcopy Index your code
hub / github.com/clojure/clojure / ops

Method ops

src/jvm/clojure/lang/Numbers.java:1098–1119  ·  view source on GitHub ↗
(Object x)

Source from the content-addressed store, hash-verified

1096static public enum Category {INTEGER, FLOATING, DECIMAL, RATIO};
1097
1098static Ops ops(Object x){
1099 Class xc = x.getClass();
1100
1101 if(xc == Long.class)
1102 return LONG_OPS;
1103 else if(xc == Double.class)
1104 return DOUBLE_OPS;
1105 else if(xc == Integer.class)
1106 return LONG_OPS;
1107 else if(xc == Float.class)
1108 return DOUBLE_OPS;
1109 else if(xc == BigInt.class)
1110 return BIGINT_OPS;
1111 else if(xc == BigInteger.class)
1112 return BIGINT_OPS;
1113 else if(xc == Ratio.class)
1114 return RATIO_OPS;
1115 else if(xc == BigDecimal.class)
1116 return BIGDECIMAL_OPS;
1117 else
1118 return LONG_OPS;
1119}
1120
1121@WarnBoxedMath(false)
1122static int hasheqFrom(Number x, Class xc){

Callers 15

isZeroMethod · 0.95
isPosMethod · 0.95
isNegMethod · 0.95
minusMethod · 0.95
minusPMethod · 0.95
incMethod · 0.95
incPMethod · 0.95
decMethod · 0.95
decPMethod · 0.95
addMethod · 0.95
addPMethod · 0.95
multiplyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected