Interface IntegerNumberProvider<T extends Number>

Type Parameters:
T - The number.
All Superinterfaces:
NumberProvider<T>, ObjectProvider<T>
All Known Implementing Classes:
IntegerProvider, LongProvider, ShortProvider

public interface IntegerNumberProvider<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(int value)
      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

      @NotNull default T createInstance(int seed)
      Description copied from interface: ObjectProvider
      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)
      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 interface ObjectProvider<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

      @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.