Record Class GenericTypeArgument
java.lang.Object
java.lang.Record
dev.archunitjava.model.GenericTypeArgument
public record GenericTypeArgument(GenericTypeArgument.Variance variance, Optional<GenericType> type)
extends Record
One exact or wildcard generic class type argument.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGenericTypeArgument(GenericTypeArgument.Variance variance, Optional<GenericType> type) Creates an instance of aGenericTypeArgumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static GenericTypeArgumentexact(GenericType type) static GenericTypeArgumentextendsBound(GenericType type) final inthashCode()Returns a hash code value for this object.static GenericTypeArgumentsuperBound(GenericType type) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.static GenericTypeArgumentvariance()Returns the value of thevariancerecord component.
-
Constructor Details
-
GenericTypeArgument
Creates an instance of aGenericTypeArgumentrecord class.- Parameters:
variance- the value for thevariancerecord componenttype- the value for thetyperecord component
-
-
Method Details
-
exact
-
extendsBound
-
superBound
-
unbounded
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
variance
Returns the value of thevariancerecord component.- Returns:
- the value of the
variancerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-