Class MapGenerationParameters

java.lang.Object
dev.orne.test.rnd.params.NullableParametersImpl
dev.orne.test.rnd.params.MapGenerationParameters
All Implemented Interfaces:
GenerationParameters, KeyValueGenericParameters, NullableParameters, NullableParameters.Builder, SizeParameters

@API(status=EXPERIMENTAL, since="0.1") public class MapGenerationParameters extends NullableParametersImpl implements KeyValueGenericParameters, SizeParameters
Parameters for random Map generation.
Since:
0.1
Version:
1.0, 2022-12
Author:
(w) Iker Hernaez
  • Constructor Details

    • MapGenerationParameters

      public MapGenerationParameters()
      Creates a new instance.
    • MapGenerationParameters

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

    • withNullable

      @NotNull public @NotNull MapGenerationParameters withNullable(boolean nullable)
      Sets if a null value is accepted.
      Specified by:
      withNullable in interface NullableParameters.Builder
      Overrides:
      withNullable in class NullableParametersImpl
      Parameters:
      nullable - If a null value is accepted.
      Returns:
      This instance, for method chaining.
    • getKeysType

      public Type getKeysType()
      Returns the keys type.
      Specified by:
      getKeysType in interface KeyValueGenericParameters
      Returns:
      The keys type.
    • setKeysType

      public void setKeysType(Type type)
      Sets the keys type.
      Specified by:
      setKeysType in interface KeyValueGenericParameters
      Parameters:
      type - The keys type.
    • withKeysType

      @NotNull public @NotNull MapGenerationParameters withKeysType(Type type)
      Sets the keys type.
      Parameters:
      type - The keys type.
      Returns:
      This instance, for method chaining.
    • getValuesType

      public Type getValuesType()
      Returns the values type.
      Specified by:
      getValuesType in interface KeyValueGenericParameters
      Returns:
      The values type.
    • setValuesType

      public void setValuesType(Type type)
      Sets the values type.
      Specified by:
      setValuesType in interface KeyValueGenericParameters
      Parameters:
      type - The values type.
    • withValuesType

      @NotNull public @NotNull MapGenerationParameters withValuesType(Type type)
      Sets the values type.
      Parameters:
      type - The values type.
      Returns:
      This instance, for method chaining.
    • getMinSize

      public int getMinSize()
      Returns the minimum size.
      Specified by:
      getMinSize in interface SizeParameters
      Returns:
      The minimum size.
    • setMinSize

      public void setMinSize(int value)
      Sets the minimum size.
      Specified by:
      setMinSize in interface SizeParameters
      Parameters:
      value - The minimum size.
    • withMinSize

      @NotNull public @NotNull MapGenerationParameters withMinSize(int value)
      Sets the minimum size.
      Parameters:
      value - The minimum size.
      Returns:
      This instance, for method chaining.
    • getMaxSize

      public int getMaxSize()
      Returns the maximum size.
      Specified by:
      getMaxSize in interface SizeParameters
      Returns:
      The maximum size.
    • setMaxSize

      public void setMaxSize(int value)
      Sets the maximum size.
      Specified by:
      setMaxSize in interface SizeParameters
      Parameters:
      value - The maximum size.
    • withMaxSize

      @NotNull public @NotNull MapGenerationParameters withMaxSize(int value)
      Sets the maximum size.
      Parameters:
      value - The maximum size.
      Returns:
      This instance, for method chaining.
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class NullableParametersImpl