KVariance

enum KVariance : Enum<KVariance>

Represents variance applied to a type parameter on the declaration site (declaration-site variance), or to a type in a projection (use-site variance).

See the Kotlin language documentation for more information.

Since Kotlin

1.1

See also

Entries

OUT
Link copied to clipboard
OUT()

The affected type parameter or type is covariant. Denoted by the out modifier in the source code.

IN
Link copied to clipboard
IN()

The affected type parameter or type is contravariant. Denoted by the in modifier in the source code.

INVARIANT
Link copied to clipboard

The affected type parameter or type is invariant, which means it has no variance applied to it.

Properties

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int