Covariance and contravariance (computer science): Difference between revisions

Content deleted Content added
Bivariance means equality of types.
Tags: Reverted Visual edit Mobile edit Mobile web edit
Bivariance means equality of types.
Tags: Reverted Visual edit Mobile edit Mobile web edit
Line 113:
<gallery perrow="5" heights="190" caption="Variance and method overriding: overview">
Image:Vererbung T.svg|Subtyping of the parameter/return type of the method.
Image:Inheritance_invariant.svg|''InvarianceBivariance''. The signature of the overriding method is unchanged.
Image:Inheritance_covariant_return.svg|''Covariant return type''. The subtyping relation is in the same direction as the relation between ClassA and ClassB.
Image:Inheritance_contravariant_argument.svg|''Contravariant parameter type''. The subtyping relation is in the opposite direction to the relation between ClassA and ClassB.