public class MathFunctions
extends java.lang.Object
Constructor and Description |
---|
MathFunctions() |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Function<java.lang.Number,java.lang.Double> |
divide(double divisor) |
static <T> com.google.common.base.Function<T,java.lang.Double> |
divide(com.google.common.base.Function<T,? extends java.lang.Number> input,
double divisor) |
static com.google.common.base.Function<java.lang.Number,java.lang.String> |
percent(int significantDigits)
returns a string where the input number is expressed as percent, with given number of significant digits
|
static com.google.common.base.Function<java.lang.Number,java.lang.Double> |
plus(double addend) |
static com.google.common.base.Function<java.lang.Number,java.lang.Integer> |
plus(int addend) |
static com.google.common.base.Function<java.lang.Number,java.lang.Long> |
plus(long addend) |
static com.google.common.base.Function<java.lang.Number,java.lang.String> |
readableString(int significantDigits,
int maxLen)
returns a string of up to maxLen length (longer in extreme cases) also capped at significantDigits significantDigits
|
static com.google.common.base.Function<java.lang.Number,java.lang.Double> |
times(double multiplicand) |
static com.google.common.base.Function<java.lang.Number,java.lang.Integer> |
times(int multiplicand) |
static com.google.common.base.Function<java.lang.Number,java.lang.Long> |
times(long multiplicand) |
public static com.google.common.base.Function<java.lang.Number,java.lang.Integer> plus(int addend)
public static com.google.common.base.Function<java.lang.Number,java.lang.Long> plus(long addend)
public static com.google.common.base.Function<java.lang.Number,java.lang.Double> plus(double addend)
public static com.google.common.base.Function<java.lang.Number,java.lang.Integer> times(int multiplicand)
public static com.google.common.base.Function<java.lang.Number,java.lang.Long> times(long multiplicand)
public static com.google.common.base.Function<java.lang.Number,java.lang.Double> times(double multiplicand)
public static com.google.common.base.Function<java.lang.Number,java.lang.Double> divide(double divisor)
public static <T> com.google.common.base.Function<T,java.lang.Double> divide(com.google.common.base.Function<T,? extends java.lang.Number> input, double divisor)
public static com.google.common.base.Function<java.lang.Number,java.lang.String> readableString(int significantDigits, int maxLen)
public static com.google.common.base.Function<java.lang.Number,java.lang.String> percent(int significantDigits)