Package dev.orne.test.rnd.params
Class SimpleGenericParametersImpl
java.lang.Object
dev.orne.test.rnd.params.SimpleGenericParametersImpl
- All Implemented Interfaces:
GenerationParameters
,SimpleGenericParameters
,SimpleGenericParameters.Builder
@API(status=EXPERIMENTAL,
since="0.1")
public class SimpleGenericParametersImpl
extends Object
implements SimpleGenericParameters, SimpleGenericParameters.Builder
The basic implementation of
SimpleGenericParameters
.- 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.SimpleGenericParameters
SimpleGenericParameters.Builder
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.SimpleGenericParametersImpl
(@NotNull GenerationParameters copy) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getType()
Returns the type parameter.int
hashCode()
void
Sets the type parameter.toString()
@NotNull SimpleGenericParametersImpl
withElementsType
(@NotNull Class<?> type) Creates a new instance of generation parameters with the specified class as list components type.@NotNull SimpleGenericParametersImpl
withElementsType
(@NotNull GenericArrayType type) Creates a new instance of generation parameters with the specified generic array type as list components type.@NotNull SimpleGenericParametersImpl
withElementsType
(@NotNull ParameterizedType type) Creates a new instance of generation parameters with the specified parameterized type as list components type.
-
Constructor Details
-
SimpleGenericParametersImpl
public SimpleGenericParametersImpl()Empty constructor. -
SimpleGenericParametersImpl
Copy constructor.- Parameters:
copy
- The instance to copy.
-
-
Method Details
-
getType
Returns the type parameter.- Specified by:
getType
in interfaceSimpleGenericParameters
- Returns:
- The type parameter
-
setType
Sets the type parameter.- Specified by:
setType
in interfaceSimpleGenericParameters
- Parameters:
type
- the type parameter
-
withElementsType
@NotNull public @NotNull SimpleGenericParametersImpl withElementsType(@NotNull @NotNull Class<?> type) Creates a new instance of generation parameters with the specified class as list components type.- Specified by:
withElementsType
in interfaceSimpleGenericParameters.Builder
- Parameters:
type
- The list components type.- Returns:
- The resulting generation parameters.
-
withElementsType
@NotNull public @NotNull SimpleGenericParametersImpl withElementsType(@NotNull @NotNull GenericArrayType type) Creates a new instance of generation parameters with the specified generic array type as list components type.- Specified by:
withElementsType
in interfaceSimpleGenericParameters.Builder
- Parameters:
type
- The list components type.- Returns:
- The resulting generation parameters.
-
withElementsType
@NotNull public @NotNull SimpleGenericParametersImpl withElementsType(@NotNull @NotNull ParameterizedType type) Creates a new instance of generation parameters with the specified parameterized type as list components type.- Specified by:
withElementsType
in interfaceSimpleGenericParameters.Builder
- Parameters:
type
- The list components type.- Returns:
- The resulting generation parameters.
-
hashCode
public int hashCode() -
equals
-
toString
-