Interface MessageStore<K,M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField>

    • Method Detail

      • putBuilder

        @Nullable
        default <B extends net.morimekta.providence.PMessageBuilder<M,F>> B putBuilder​(@Nonnull
                                                                                       K key,
                                                                                       @Nonnull
                                                                                       B builder)
        Put the message represented by the builder into the store on the given key. Any further modifications to the builder will not be reflected on the store.
        Type Parameters:
        B - The builder type.
        Parameters:
        key - The key to store the builder on.
        builder - The builder to store.
        Returns:
        The replaced builder if one was replaced. Null if theentry was created. Any modifications to the returned builder will not be reflected onto the store.
      • putAllBuilders

        @Nonnull
        default <B extends net.morimekta.providence.PMessageBuilder<M,F>> java.util.Map<K,B> putAllBuilders​(@Nonnull
                                                                                                            java.util.Map<K,B> builders)
        Put a collection of key and builder pairs onto the store. Any further modifications to the builders will not be reflected onto the store.
        Type Parameters:
        B - The builder type.
        Parameters:
        builders - Map of builders to put into the store.
        Returns:
        Map of replaced entries. Any modifications to the returned builders will not be reflected onto the store.