Package org.kairosdb.bigqueue.utils
Class Calculator
- java.lang.Object
-
- org.kairosdb.bigqueue.utils.Calculator
-
public class Calculator extends Object
-
-
Constructor Summary
Constructors Constructor Description Calculator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longdiv(long val, int bits)divide by shiftstatic longmod(long val, int bits)mod by shiftstatic longmul(long val, int bits)multiply by shift
-
-
-
Method Detail
-
mod
public static long mod(long val, int bits)mod by shift- Parameters:
val- value to modbits- number of bits to shift- Returns:
- answer
-
mul
public static long mul(long val, int bits)multiply by shift- Parameters:
val- value to multiplybits- number of bits to shift- Returns:
- answer
-
div
public static long div(long val, int bits)divide by shift- Parameters:
val- value to dividebits- number of bits to shift- Returns:
- answer
-
-