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 TypeMethodDescriptionbooleangetType()Returns the type parameter.inthashCode()voidSets the type parameter.toString()@NotNull SimpleGenericParametersImplwithElementsType(@NotNull Class<?> type) Creates a new instance of generation parameters with the specified class as list components type.@NotNull SimpleGenericParametersImplwithElementsType(@NotNull GenericArrayType type) Creates a new instance of generation parameters with the specified generic array type as list components type.@NotNull SimpleGenericParametersImplwithElementsType(@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:
getTypein interfaceSimpleGenericParameters- Returns:
- The type parameter
-
setType
Sets the type parameter.- Specified by:
setTypein 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:
withElementsTypein 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:
withElementsTypein 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:
withElementsTypein interfaceSimpleGenericParameters.Builder- Parameters:
type- The list components type.- Returns:
- The resulting generation parameters.
-
hashCode
public int hashCode() -
equals
-
toString
-