Default Bound Entry
open class DefaultBoundEntry<P : Any, C : Any>(container: PersistentDataContainer, key: String, type: PersistentDataType<P, C>, val defaultValue: () -> C) : BoundEntry<P, C> (source)
Represents a bound entry with a default value for a key in a PersistentDataContainer.
This class extends BoundEntry and adds functionality to retrieve a value with a specified default value when the key does not exist in the container.
The default value is provided as a lambda to ensure it is lazily evaluated and only invoked when required.
Author
Fantamomo
Since
3.2-SNAPSHOT
Parameters
P
The primitive data type.
C
The complex data type.
Inheritors
Constructors
Link copied to clipboard
constructor(container: PersistentDataContainer, key: String, type: PersistentDataType<P, C>, defaultValue: () -> C)