| Modifier and Type | Class and Description |
|---|---|
static class |
NumericCase.WithinChain<T extends Number> |
| Constructor and Description |
|---|
NumericCase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
abs(T t) |
protected abstract T |
add(T a,
T b) |
protected void |
addAdditionalSubcases(Set<Subcase<T>> subcases) |
Case<T> |
excluding(Iterable<T> values) |
protected T |
getMax() |
protected T |
getMin() |
Set<Subcase<T>> |
getSubcases()
Returns the specific set of subcases that describe all equivalency classes for this case.
|
Case<T> |
greaterThanOrEqualTo(Generator<T> minInclusive) |
Case<T> |
greaterThanOrEqualTo(T minInclusive) |
protected abstract T |
i2t(int i) |
Case<T> |
inRange(T minInclusive,
T maxInclusive) |
Case<T> |
lessThanOrEqualTo(Generator<T> maxInclusive) |
Case<T> |
lessThanOrEqualTo(T maxInclusive) |
protected abstract boolean |
lt(T a,
T b) |
protected abstract T |
negate(T t) |
protected abstract NumericCase<T> |
newCase() |
static NumericCase<Byte> |
ofBytes() |
static NumericCase<Integer> |
ofIntegers() |
static NumericCase<Long> |
ofLongs() |
static NumericCase<Short> |
ofShorts() |
protected abstract T |
rng(Random random) |
protected abstract T |
rngLessThan(Random random,
T maxInclusive) |
NumericCase.WithinChain<T> |
within(T range) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexcluding, excluding, generateAllOnce, generateAllOnce, generateAnyOnce, generateAnyOnce, or, orNullprotected T getMax()
protected T getMin()
public NumericCase.WithinChain<T> within(T range)
public Set<Subcase<T>> getSubcases()
CaseCases are expected to return at least one subcase. When the fuzzy engine is determining how many test cases to execute, it does so in terms of subcases, not cases. Thus, when using the pairwise permutation algorithm, the fuzzy library works to ensure that each possible combination of two subcases are executed.
Note to implementors: cases should generally not include null values as
possible outputs. Instead, consumers are expected to use the Case.orNull() method (or, equivalently,
Any.nullableOf(com.redfin.fuzzy.Case<T>)) to declare that their cases should also generate null values.
getSubcases in interface Case<T extends Number>protected abstract NumericCase<T> newCase()
protected abstract T i2t(int i)
public static NumericCase<Byte> ofBytes()
public static NumericCase<Short> ofShorts()
public static NumericCase<Integer> ofIntegers()
public static NumericCase<Long> ofLongs()
Copyright © 2017 Redfin. All rights reserved.