# mapProperty

abstract fun <K, V> mapProperty(keyType: Class<K>, valueType: Class<V>): MapProperty<K, V>(source)

Creates a MapProperty implementation to hold a Map of the given key type `K` and value type `V`. The property has an empty map as its initial value.

The implementation will return immutable Map values from its query methods.

#### Return

the property. Never returns null.

#### Since

5.1

#### Parameters

keyType

the type of key.

valueType

the type of value.

<K>

the type of key.

<V>

the type of value.