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.BuilderNested classes/interfaces inherited from interface dev.orne.test.rnd.params.SimpleGenericParameters
SimpleGenericParameters.BuilderNested 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_NULLABLEFields 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 TypeMethodDescriptionbooleanintReturns the maximum size.intReturns the minimum size.getType()Returns the components type.inthashCode()voidsetMaxSize(int value) Sets the maximum size.voidsetMinSize(int value) Sets the minimum size.voidSets the components type.@NotNull CollectionGenerationParameterswithMaxSize(int value) Sets the maximum size.@NotNull CollectionGenerationParameterswithMinSize(int value) Sets the minimum size.@NotNull CollectionGenerationParameterswithNullable(boolean nullable) Sets if anullvalue is accepted.@NotNull CollectionGenerationParametersSets 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 anullvalue is accepted.- Specified by:
withNullablein interfaceNullableParameters.Builder- Overrides:
withNullablein classNullableParametersImpl- Parameters:
nullable- If anullvalue is accepted.- Returns:
- This instance, for method chaining.
-
getType
Returns the components type.- Specified by:
getTypein interfaceSimpleGenericParameters- Returns:
- The components type.
-
setType
Sets the components type.- Specified by:
setTypein 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:
getMinSizein interfaceSizeParameters- Returns:
- The minimum size.
-
setMinSize
public void setMinSize(int value) Sets the minimum size.- Specified by:
setMinSizein 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:
getMaxSizein interfaceSizeParameters- Returns:
- The maximum size.
-
setMaxSize
public void setMaxSize(int value) Sets the maximum size.- Specified by:
setMaxSizein 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:
hashCodein classNullableParametersImpl
-
equals
- Overrides:
equalsin classNullableParametersImpl
-