Compound
A compound is a key-value storage intended for serialization via Cbf.
After deserialization, a Compound contains only binary data of values of unknown types (and the keys under which they're stored), which is then lazily deserialized to the requested type when accessed via get. Conversely, the type information for serialization is remembered during set.
Functions
Creates a MutableProvider of the type T that is linked to the value of this compound under key. If this compound does not have an entry under key, defaultValue is used to create it lazily. If there is already an entry provider for key that matches T, defaultValue will be ignored and the existing provider will be returned.
Creates a MutableProvider of the non-null type T that is linked to the value of this compound under key. If this compound does not have an entry under key, defaultValue is used to create it lazily. If there is already an entry provider for key that matches T, defaultValue will be ignored and the existing provider will be returned.
Creates a MutableProvider of type that is linked to the value of this compound under key. If this compound does not have an entry under key, defaultValue is used to create it lazily. If there is already an entry provider for key that matches type, defaultValue will be ignored and the existing provider will be returned.
Gets the value under key as T or puts and returns the value generated by defaultValue if it doesn't exist.
Gets the value under key as type or puts and returns the value generated by defaultValue if it doesn't exist.
Checks whether this compound is not empty.
Creates a shallow copy of this compound, not copying any values.