Interface DoubleNumberProvider<T extends Number>

Type Parameters:
T - The number.
All Superinterfaces:
NumberProvider<T>, ObjectProvider<T>
All Known Implementing Classes:
DoubleProvider, FloatProvider

public interface DoubleNumberProvider<T extends Number> extends NumberProvider<T>
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 Details

    • defaultInstance

      @NotNull default T defaultInstance()
      Description copied from interface: ObjectProvider
      Creates a single instance of class being tested using the default constructor.
      Specified by:
      defaultInstance in interface ObjectProvider<T extends Number>
      Returns:
      an instance of class.
    • createValue

      T createValue(double value)
      Creates an instance of the double number class with a numeric value equal to the primitive double value.
      Parameters:
      value - the primitive double value.
      Returns:
      an instance of the double class.
    • createInstance

      @NotNull default T createInstance(int seed)
      Creates a single instance of class being tested based upon an integer seed value.
      Specified by:
      createInstance in interface ObjectProvider<T extends Number>
      Parameters:
      seed - an integer seed to use to create and instance of the class.
      Returns:
      an instance of class.
    • copyInstance

      @NotNull default T copyInstance(@NotNull T o)
      Copies an instance of the class being tested. The copy will satisfy equality semantics with the original instance being copied.
      Specified by:
      copyInstance in interface ObjectProvider<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

      @NotNull default T maxValue()
      Returns the maximum value for the Number class.
      Specified by:
      maxValue in interface NumberProvider<T extends Number>
      Returns:
      The maximum value.
    • minValue

      @NotNull default T minValue()
      Returns the minimum value for the Number class.
      Specified by:
      minValue in interface NumberProvider<T extends Number>
      Returns:
      The minimum value.