Interface DefaultAdaptedKeyValue<S,​K,​O,​V>

    • Method Detail

      • of

        static <S,​K,​O,​V> DefaultAdaptedKeyValue<S,​K,​O,​V> of​(V def,
                                                                                                AdaptedKeyValue<S,​K,​O,​V> value)
        Creates a new DefaultAdaptedKeyValue by delegating to the provided arguments. Getting the value will always deserialize from storage, and setting the value will always serialize into storage.
        Type Parameters:
        S - storage type
        K - key type
        O - output type
        V - value type
        Parameters:
        def - the default fallback value
        value - an existing key value implementation that gets and sets the value from storage in the original 'output' type
        Returns:
        a new instance composed of the arguments