-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Comparable
public class StringCachingBigInteger extends BigInteger
Because we are using BigInteger for Trace and Span Id, the toString() operator may result in heavy computation and string allocation overhead. In order to limit this, we are caching the result of toString, thereby taking advantage of the immutability of BigInteger.
-
-
Constructor Summary
Constructors Constructor Description StringCachingBigInteger(Array<byte> val)StringCachingBigInteger(int signum, Array<byte> magnitude)StringCachingBigInteger(String val, int radix)StringCachingBigInteger(String val)StringCachingBigInteger(int numBits, Random rnd)StringCachingBigInteger(int bitLength, int certainty, Random rnd)
-
Method Summary
-
Methods inherited from class java.math.BigInteger
abs, add, and, andNot, bitCount, bitLength, byteValueExact, clearBit, compareTo, divide, divideAndRemainder, doubleValue, equals, flipBit, floatValue, gcd, getLowestSetBit, hashCode, intValue, intValueExact, isProbablePrime, longValue, longValueExact, max, min, mod, modInverse, modPow, multiply, negate, nextProbablePrime, not, or, pow, probablePrime, remainder, setBit, shiftLeft, shiftRight, shortValueExact, signum, sqrt, sqrtAndRemainder, subtract, testBit, toByteArray, toString, valueOf, xor -
Methods inherited from class java.lang.Number
byteValue, shortValue -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
StringCachingBigInteger
StringCachingBigInteger(Array<byte> val)
-
StringCachingBigInteger
StringCachingBigInteger(int signum, Array<byte> magnitude)
-
StringCachingBigInteger
StringCachingBigInteger(String val, int radix)
-
StringCachingBigInteger
StringCachingBigInteger(String val)
-
StringCachingBigInteger
StringCachingBigInteger(int numBits, Random rnd)
-
StringCachingBigInteger
StringCachingBigInteger(int bitLength, int certainty, Random rnd)
-
-
-
-