toBuffered

Converts the current PersistentDataContainer to a buffered version.

If the container is already an instance of BufferedPersistentDataContainer, it returns the instance itself. If the container is a MutablePersistentDataContainer, it calls its toBuffered extension function. Otherwise, it wraps the current container in a new instance of BufferedPersistentDataContainerImpl.

Return

A BufferedPersistentDataContainer representing the buffered version of the current container.

Author

Fantamomo

Since

1.0-SNAPSHOT


Converts this MutablePersistentDataContainer into a MutableBufferedPersistentDataContainer.

If this instance is already a MutableBufferedPersistentDataContainer, it is returned as-is. Otherwise, a new instance of MutableBufferedPersistentDataContainerImpl is created, wrapping this container to add buffering capabilities.

Receiver

The MutablePersistentDataContainer to convert to a buffered container.

Return

A MutableBufferedPersistentDataContainer, either by casting or by wrapping this container.

Since

1.0-SNAPSHOT

Author

Fantamomo