Package dev.orne.test.rnd.params
Class CollectionGenerationParameters
java.lang.Object
dev.orne.test.rnd.params.NullableParametersImpl
dev.orne.test.rnd.params.CollectionGenerationParameters
- All Implemented Interfaces:
GenerationParameters
,NullableParameters
,NullableParameters.Builder
,SimpleGenericParameters
,SizeParameters
@API(status=EXPERIMENTAL,
since="0.1")
public class CollectionGenerationParameters
extends NullableParametersImpl
implements SimpleGenericParameters, SizeParameters
Parameters for random
Collection
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.NullableParameters
NullableParameters.Builder
Nested classes/interfaces inherited from interface dev.orne.test.rnd.params.SimpleGenericParameters
SimpleGenericParameters.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.CollectionGenerationParameters
(@NotNull GenerationParameters copy) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns the maximum size.int
Returns the minimum size.getType()
Returns the components type.int
hashCode()
void
setMaxSize
(int value) Sets the maximum size.void
setMinSize
(int value) Sets the minimum size.void
Sets the components type.@NotNull CollectionGenerationParameters
withMaxSize
(int value) Sets the maximum size.@NotNull CollectionGenerationParameters
withMinSize
(int value) Sets the minimum size.@NotNull CollectionGenerationParameters
withNullable
(boolean nullable) Sets if anull
value is accepted.@NotNull CollectionGenerationParameters
Sets the components type.Methods inherited from class dev.orne.test.rnd.params.NullableParametersImpl
isNullable, setNullable, toString
-
Constructor Details
-
CollectionGenerationParameters
public CollectionGenerationParameters()Creates a new instance. -
CollectionGenerationParameters
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.
-
getType
Returns the components type.- Specified by:
getType
in interfaceSimpleGenericParameters
- Returns:
- The components type.
-
setType
Sets the components type.- Specified by:
setType
in interfaceSimpleGenericParameters
- Parameters:
type
- The components type.
-
withType
Sets the components type.- Parameters:
type
- The components 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
-