Interface IntegerNumberProvider<T extends Number>
- Type Parameters:
T
- The number.
- All Superinterfaces:
NumberProvider<T>
,ObjectProvider<T>
- All Known Implementing Classes:
IntegerProvider
,LongProvider
,ShortProvider
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
(int value) Creates an instance of the integer number class with a numeric value equal to the primitive integer value.default T
Creates a single instance of class being tested using the default constructor.default int
The maximum integer value that can be represented by the integer class.default T
maxValue()
Returns the maximum value for theNumber
class.default int
The minimum integer value that can be represented by the integer 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 integer number class with a numeric value equal to the primitive integer value.- Parameters:
value
- the primitive integer value.- Returns:
- an instance of the integer class.
-
createInstance
Description copied from interface:ObjectProvider
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
Description copied from interface:ObjectProvider
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.
-
maxIntegerValue
default int maxIntegerValue()The maximum integer value that can be represented by the integer class.- Returns:
- the maximum integer value.
-
minIntegerValue
default int minIntegerValue()The minimum integer value that can be represented by the integer class.- Returns:
- the minimum integer 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.
-