DelegatingPersistentDataType

abstract class DelegatingPersistentDataType<P : Any, D : Any, C : Any>(val delegate: PersistentDataType<P, D>) : PersistentDataType<P, C> (source)

A PersistentDataType that first converts the complex type to another type, which then uses the delegate to convert to the primitive type.

Parameters

P

the primitive type

D

the delegated type

C

the complex type

Constructors

Link copied to clipboard
constructor(delegate: PersistentDataType<P, D>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun fromDelegatedType(primitive: D): C
Link copied to clipboard
override fun fromPrimitive(primitive: P, context: PersistentDataAdapterContext): C
Link copied to clipboard
@NotNull
abstract fun getComplexType(): @NotNull Class<C>
Link copied to clipboard
override fun getPrimitiveType(): Class<P>
Link copied to clipboard
abstract fun toDelegatedType(complex: C): D
Link copied to clipboard
override fun toPrimitive(complex: C, context: PersistentDataAdapterContext): P