Package dev.orne.test.rnd.params
Class StringGenerationParameters
java.lang.Object
dev.orne.test.rnd.params.NullableParametersImpl
dev.orne.test.rnd.params.StringGenerationParameters
- All Implemented Interfaces:
GenerationParameters
,NullableParameters
,NullableParameters.Builder
,SizeParameters
@API(status=EXPERIMENTAL,
since="0.1")
public class StringGenerationParameters
extends NullableParametersImpl
implements SizeParameters
Parameters for random
String
generation.- Since:
- 0.1
- Version:
- 1.0, 2022-11
- 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.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.StringGenerationParameters
(@NotNull GenerationParameters copy) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns the maximum size.int
Returns the minimum size.int
hashCode()
void
setMaxSize
(int value) Sets the maximum size.void
setMinSize
(int value) Sets the minimum size.@NotNull StringGenerationParameters
withMaxSize
(int value) Sets the maximum size.@NotNull StringGenerationParameters
withMinSize
(int value) Sets the minimum size.@NotNull StringGenerationParameters
withNullable
(boolean nullable) Sets if anull
value is accepted.Methods inherited from class dev.orne.test.rnd.params.NullableParametersImpl
isNullable, setNullable, toString
-
Constructor Details
-
StringGenerationParameters
public StringGenerationParameters()Creates a new instance. -
StringGenerationParameters
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.
-
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
-