Package dev.orne.test.rnd.params
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.orne.test.rnd.params.KeyValueGenericParameters
KeyValueGenericParameters.KeysTypeBuilder, KeyValueGenericParameters.ValuesTypeBuilder
Nested classes/interfaces inherited from interface dev.orne.test.rnd.params.NullableParameters
NullableParameters.Builder
Nested classes/interfaces inherited from interface dev.orne.test.rnd.params.SizeParameters
SizeParameters.Builder
-
Field Summary
Fields inherited from interface dev.orne.test.rnd.params.NullableParameters
DEFAULT_NULLABLE
Fields inherited from interface dev.orne.test.rnd.params.SizeParameters
DEFAULT_MAX_SIZE, DEFAULT_MIN_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance.MapGenerationParameters
(@NotNull GenerationParameters copy) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the keys type.int
Returns the maximum size.int
Returns the minimum size.Returns the values type.int
hashCode()
void
setKeysType
(Type type) Sets the keys type.void
setMaxSize
(int value) Sets the maximum size.void
setMinSize
(int value) Sets the minimum size.void
setValuesType
(Type type) Sets the values type.@NotNull MapGenerationParameters
withKeysType
(Type type) Sets the keys type.@NotNull MapGenerationParameters
withMaxSize
(int value) Sets the maximum size.@NotNull MapGenerationParameters
withMinSize
(int value) Sets the minimum size.@NotNull MapGenerationParameters
withNullable
(boolean nullable) Sets if anull
value is accepted.@NotNull MapGenerationParameters
withValuesType
(Type type) Sets the values type.Methods inherited from class dev.orne.test.rnd.params.NullableParametersImpl
isNullable, setNullable, toString
-
Constructor Details
-
MapGenerationParameters
public MapGenerationParameters()Creates a new instance. -
MapGenerationParameters
Copy constructor.- Parameters:
copy
- The instance to copy.
-
-
Method Details
-
withNullable
Sets if anull
value is accepted.- Specified by:
withNullable
in interfaceNullableParameters.Builder
- Overrides:
withNullable
in classNullableParametersImpl
- Parameters:
nullable
- If anull
value is accepted.- Returns:
- This instance, for method chaining.
-
getKeysType
Returns the keys type.- Specified by:
getKeysType
in interfaceKeyValueGenericParameters
- Returns:
- The keys type.
-
setKeysType
Sets the keys type.- Specified by:
setKeysType
in interfaceKeyValueGenericParameters
- Parameters:
type
- The keys type.
-
withKeysType
Sets the keys type.- Parameters:
type
- The keys type.- Returns:
- This instance, for method chaining.
-
getValuesType
Returns the values type.- Specified by:
getValuesType
in interfaceKeyValueGenericParameters
- Returns:
- The values type.
-
setValuesType
Sets the values type.- Specified by:
setValuesType
in interfaceKeyValueGenericParameters
- Parameters:
type
- The values type.
-
withValuesType
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 interfaceSizeParameters
- Returns:
- The minimum size.
-
setMinSize
public void setMinSize(int value) Sets the minimum size.- Specified by:
setMinSize
in interfaceSizeParameters
- Parameters:
value
- The minimum size.
-
withMinSize
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 interfaceSizeParameters
- Returns:
- The maximum size.
-
setMaxSize
public void setMaxSize(int value) Sets the maximum size.- Specified by:
setMaxSize
in interfaceSizeParameters
- Parameters:
value
- The maximum size.
-
withMaxSize
Sets the maximum size.- Parameters:
value
- The maximum size.- Returns:
- This instance, for method chaining.
-
hashCode
public int hashCode()- Overrides:
hashCode
in classNullableParametersImpl
-
equals
- Overrides:
equals
in classNullableParametersImpl
-