Package dev.orne.test.rnd.params
Class KeyValueGenericParametersImpl
java.lang.Object
dev.orne.test.rnd.params.KeyValueGenericParametersImpl
- All Implemented Interfaces:
GenerationParameters
,KeyValueGenericParameters
,KeyValueGenericParameters.KeysTypeBuilder
,KeyValueGenericParameters.ValuesTypeBuilder
@API(status=EXPERIMENTAL,
since="0.1")
public class KeyValueGenericParametersImpl
extends Object
implements KeyValueGenericParameters, KeyValueGenericParameters.KeysTypeBuilder, KeyValueGenericParameters.ValuesTypeBuilder
The basic implementation of
KeyValueGenericParameters
.- 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
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.KeyValueGenericParametersImpl
(@NotNull GenerationParameters copy) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the keys type parameter.Returns the values type parameter.int
hashCode()
void
setKeysType
(Type type) Sets the keys type parameter.void
setValuesType
(Type type) Sets the values type parameter.toString()
@NotNull KeyValueGenericParametersImpl
withKeysType
(@NotNull Class<?> type) Specifies the type of the map keys.@NotNull KeyValueGenericParametersImpl
withKeysType
(@NotNull GenericArrayType type) Creates a new instance of generation parameters with the specified generic array type as list components type.@NotNull KeyValueGenericParametersImpl
withKeysType
(@NotNull ParameterizedType type) Creates a new instance of generation parameters with the specified parameterized type as list components type.@NotNull KeyValueGenericParametersImpl
withValuesType
(@NotNull Class<?> type) Creates a new instance of generation parameters with the specified keys and values types.@NotNull KeyValueGenericParametersImpl
withValuesType
(@NotNull GenericArrayType type) Creates a new instance of generation parameters with the specified keys and values types.@NotNull KeyValueGenericParametersImpl
withValuesType
(@NotNull ParameterizedType type) Creates a new instance of generation parameters with the specified keys and values types.
-
Constructor Details
-
KeyValueGenericParametersImpl
public KeyValueGenericParametersImpl()Empty constructor. -
KeyValueGenericParametersImpl
Copy constructor.- Parameters:
copy
- The instance to copy.
-
-
Method Details
-
getKeysType
Returns the keys type parameter.- Specified by:
getKeysType
in interfaceKeyValueGenericParameters
- Returns:
- The keys type parameter
-
setKeysType
Sets the keys type parameter.- Specified by:
setKeysType
in interfaceKeyValueGenericParameters
- Parameters:
type
- the keys type parameter
-
withKeysType
@NotNull public @NotNull KeyValueGenericParametersImpl withKeysType(@NotNull @NotNull Class<?> type) Specifies the type of the map keys.- Specified by:
withKeysType
in interfaceKeyValueGenericParameters.KeysTypeBuilder
- Parameters:
type
- The type of the map keys.- Returns:
- The next stage builder.
-
withKeysType
@NotNull public @NotNull KeyValueGenericParametersImpl withKeysType(@NotNull @NotNull ParameterizedType type) Creates a new instance of generation parameters with the specified parameterized type as list components type.- Specified by:
withKeysType
in interfaceKeyValueGenericParameters.KeysTypeBuilder
- Parameters:
type
- The type of the map keys.- Returns:
- The next stage builder.
-
withKeysType
@NotNull public @NotNull KeyValueGenericParametersImpl withKeysType(@NotNull @NotNull GenericArrayType type) Creates a new instance of generation parameters with the specified generic array type as list components type.- Specified by:
withKeysType
in interfaceKeyValueGenericParameters.KeysTypeBuilder
- Parameters:
type
- The type of the map keys.- Returns:
- The next stage builder.
-
getValuesType
Returns the values type parameter.- Specified by:
getValuesType
in interfaceKeyValueGenericParameters
- Returns:
- The values type parameter
-
setValuesType
Sets the values type parameter.- Specified by:
setValuesType
in interfaceKeyValueGenericParameters
- Parameters:
type
- the values type parameter
-
withValuesType
@NotNull public @NotNull KeyValueGenericParametersImpl withValuesType(@NotNull @NotNull Class<?> type) Creates a new instance of generation parameters with the specified keys and values types.- Specified by:
withValuesType
in interfaceKeyValueGenericParameters.ValuesTypeBuilder
- Parameters:
type
- The type of the map values.- Returns:
- The resulting generation parameters.
-
withValuesType
@NotNull public @NotNull KeyValueGenericParametersImpl withValuesType(@NotNull @NotNull ParameterizedType type) Creates a new instance of generation parameters with the specified keys and values types.- Specified by:
withValuesType
in interfaceKeyValueGenericParameters.ValuesTypeBuilder
- Parameters:
type
- The type of the map values.- Returns:
- The resulting generation parameters.
-
withValuesType
@NotNull public @NotNull KeyValueGenericParametersImpl withValuesType(@NotNull @NotNull GenericArrayType type) Creates a new instance of generation parameters with the specified keys and values types.- Specified by:
withValuesType
in interfaceKeyValueGenericParameters.ValuesTypeBuilder
- Parameters:
type
- The type of the map values.- Returns:
- The resulting generation parameters.
-
hashCode
public int hashCode() -
equals
-
toString
-