Class NullableParametersImpl

java.lang.Object
dev.orne.test.rnd.params.NullableParametersImpl
All Implemented Interfaces:
GenerationParameters, NullableParameters, NullableParameters.Builder
Direct Known Subclasses:
CollectionGenerationParameters, MapGenerationParameters, StringGenerationParameters

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

    • NullableParametersImpl

      public NullableParametersImpl()
      Empty constructor.
    • NullableParametersImpl

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

    • isNullable

      public boolean isNullable()
      Returns true if a null value is accepted.
      Specified by:
      isNullable in interface NullableParameters
      Returns:
      If a null value is accepted.
    • setNullable

      public void setNullable(boolean nullable)
      Sets if a null value is accepted.
      Specified by:
      setNullable in interface NullableParameters
      Parameters:
      nullable - If a null value is accepted.
    • withNullable

      @NotNull public @NotNull NullableParametersImpl withNullable(boolean nullable)
      Sets if a null value is accepted.
      Specified by:
      withNullable in interface NullableParameters.Builder
      Parameters:
      nullable - If a null value is accepted.
      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