Class NumberParametersImpl

java.lang.Object
dev.orne.test.rnd.params.NumberParametersImpl
All Implemented Interfaces:
GenerationParameters, NumberParameters, NumberParameters.Builder

@API(status=EXPERIMENTAL, since="0.1") public class NumberParametersImpl extends Object implements NumberParameters, NumberParameters.Builder
The basic implementation of NumberParameters.
Since:
0.1
Version:
1.0, 2022-12
Author:
(w) Iker Hernaez
  • Constructor Details

    • NumberParametersImpl

      public NumberParametersImpl()
      Empty constructor.
    • NumberParametersImpl

      public NumberParametersImpl(@NotNull @NotNull GenerationParameters copy)
      Copy constructor.
      Parameters:
      copy - The instance to copy.
  • Method Details

    • getMin

      @NotNull public @NotNull Number getMin()
      Returns the minimum (inclusive) value.
      Specified by:
      getMin in interface NumberParameters
      Returns:
      The minimum value.
    • setMin

      public void setMin(@NotNull @NotNull Number value)
      Sets the minimum (inclusive) value.
      Specified by:
      setMin in interface NumberParameters
      Parameters:
      value - The minimum value.
    • withMin

      @NotNull public @NotNull NumberParametersImpl withMin(@NotNull @NotNull Number value)
      Sets the minimum (inclusive) value.
      Specified by:
      withMin in interface NumberParameters.Builder
      Parameters:
      value - The minimum value.
      Returns:
      This instance, for method chaining.
    • getMax

      @NotNull public @NotNull Number getMax()
      Returns the maximum (inclusive) value.
      Specified by:
      getMax in interface NumberParameters
      Returns:
      The maximum value.
    • setMax

      public void setMax(@NotNull @NotNull Number value)
      Sets the maximum (inclusive) value.
      Specified by:
      setMax in interface NumberParameters
      Parameters:
      value - The maximum value.
    • withMax

      @NotNull public @NotNull NumberParametersImpl withMax(@NotNull @NotNull Number value)
      Sets the maximum (inclusive) value.
      Specified by:
      withMax in interface NumberParameters.Builder
      Parameters:
      value - The maximum value.
      Returns:
      This instance, for method chaining.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object