Interface DoubleNumberProvider<T extends Number>
- Type Parameters:
T
- The number.
- All Superinterfaces:
NumberProvider<T>
,ObjectProvider<T>
- All Known Implementing Classes:
DoubleProvider
,FloatProvider
Provides instances of a class that implements the
Number
interface that represent an integer value for the
purposes of testing.- Since:
- 1.0;0
- Author:
- evanbergstrom
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
copyInstance
(T o) Copies an instance of the class being tested.default T
createInstance
(int seed) Creates a single instance of class being tested based upon an integer seed value.createValue
(double value) Creates an instance of the double number class with a numeric value equal to the primitivedouble
value.default T
Creates a single instance of class being tested using the default constructor.default double
The maximum double value that can be represented by the double class.default T
maxValue()
Returns the maximum value for theNumber
class.default double
The minimum double value that can be represented by the double class.default T
minValue()
Returns the minimum value for theNumber
class.Methods inherited from interface org.soliscode.test.provider.ObjectProvider
createEqualObjects, createInstance, createRandoInstances, createUniqueInstances, createUniqueInstances, equalInstanceSupplier, randomInstanceSupplier, uniqueInstanceSupplier, uniqueInstanceSupplier, uniqueSizeLimit
-
Method Details
-
defaultInstance
Description copied from interface:ObjectProvider
Creates a single instance of class being tested using the default constructor.- Specified by:
defaultInstance
in interfaceObjectProvider<T extends Number>
- Returns:
- an instance of class.
-
createValue
Creates an instance of the double number class with a numeric value equal to the primitivedouble
value.- Parameters:
value
- the primitive double value.- Returns:
- an instance of the double class.
-
createInstance
Creates a single instance of class being tested based upon an integer seed value.- Specified by:
createInstance
in interfaceObjectProvider<T extends Number>
- Parameters:
seed
- an integer seed to use to create and instance of the class.- Returns:
- an instance of class.
-
copyInstance
Copies an instance of the class being tested. The copy will satisfy equality semantics with the original instance being copied.- Specified by:
copyInstance
in interfaceObjectProvider<T extends Number>
- Parameters:
o
- the instance to copy.- Returns:
- a copy of the instance.
-
maxPrimitiveValue
default double maxPrimitiveValue()The maximum double value that can be represented by the double class.- Returns:
- the maximum double value.
-
minPrimitiveValue
default double minPrimitiveValue()The minimum double value that can be represented by the double class.- Returns:
- the minimum double value.
-
maxValue
Returns the maximum value for theNumber
class.- Specified by:
maxValue
in interfaceNumberProvider<T extends Number>
- Returns:
- The maximum value.
-
minValue
Returns the minimum value for theNumber
class.- Specified by:
minValue
in interfaceNumberProvider<T extends Number>
- Returns:
- The minimum value.
-