Singleton Persistent Data Container
A singleton implementation of PersistentDataContainer for storing a single key-value pair, where the value must be a primitive data type.
This container ensures that only a single primitive type value is associated with the specified key. Primitive type validation is performed during initialization.
Author
Fantamomo
Since
1.0-SNAPSHOT
Parameters
The type of the primitive value.
Throws
If the provided value type is not a valid primitive type.
Implements the PersistentDataContainer interface, providing methods for retrieving, checking, and saving the key-value pair in this container.
Functions
Creates a bound entry for accessing persistent data within the container.
Creates a DefaultBoundEntry that is bound to the specified PersistentDataContainer. This entry allows the retrieval of a value using the specified key and type, with the capability to provide a default value if the key does not exist in the container.
Checks if the container contains a value associated with the specified PersistentKey.
This methode copies all key-value pairs from the PersistentDataContainer to the receiver.
This methode is used to get the direct value of the key.
This method is used to get the value of the specified key from the PersistentDataContainer.
This method is used to get the value of the specified key from the PersistentDataContainer.
This methode is uses to get the element by the key.
Gets the primitive value associated with the specified key.
This method is used to get the value of the specified key from the PersistentDataContainer.
Saves the data in the container to the specified output stream.
Converts the current PersistentDataContainer to a buffered version.
Converts the current PersistentDataContainer instance to an immutable implementation.
Converts this PersistentDataContainer into a MutablePersistentDataContainer.