getPrimitive

open override fun <P : Any, C : Any> getPrimitive(key: String, type: PersistentDataType<P, C>): P?(source)

Gets the primitive value associated with the specified key.

This method uses the provided PersistentDataType to convert the value to the specified primitive type.

Return

The primitive value associated with the specified key, converted to the specified type,

Parameters

key

The key associated with the value to be retrieved.

type

The PersistentDataType used to convert the value to the specified primitive type.