public class MathPredicates
extends java.lang.Object
Constructor and Description |
---|
MathPredicates() |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.Number> |
equalsApproximately(java.lang.Number val)
Convenience for
#equalsApproximately(double,double) with a delta of 10^{-6}. |
static <T extends java.lang.Number> |
equalsApproximately(java.lang.Number val,
double delta)
Creates a predicate comparing a given number with
val . |
static <T extends java.lang.Number> |
greaterThan(double val)
Creates a predicate comparing a given number with
val . |
static <T extends java.lang.Number> |
greaterThanOrEqual(double val)
Creates a predicate comparing a given number with
val . |
static <T extends java.lang.Number> |
lessThan(double val)
Creates a predicate comparing a given number with
val . |
static <T extends java.lang.Number> |
lessThanOrEqual(double val)
Creates a predicate comparing a given number with
val . |
public static <T extends java.lang.Number> com.google.common.base.Predicate<T> greaterThan(double val)
val
.
A number of null
passed to the predicate will always return false.public static <T extends java.lang.Number> com.google.common.base.Predicate<T> greaterThanOrEqual(double val)
val
.
A number of null
passed to the predicate will always return false.public static <T extends java.lang.Number> com.google.common.base.Predicate<T> lessThan(double val)
val
.
A number of null
passed to the predicate will always return false.public static <T extends java.lang.Number> com.google.common.base.Predicate<T> lessThanOrEqual(double val)
val
.
A number of null
passed to the predicate will always return false.public static <T extends java.lang.Number> com.google.common.base.Predicate<T> equalsApproximately(java.lang.Number val, double delta)
val
.
A number of null
passed to the predicate will always return false.public static <T extends java.lang.Number> com.google.common.base.Predicate<T> equalsApproximately(java.lang.Number val)
#equalsApproximately(double,double)
with a delta of 10^{-6}.