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

  • All Superinterfaces:
    ReadOnlyStore<K,M>
    All Known Subinterfaces:
    MessageStore<K,M,F>
    All Known Implementing Classes:
    DirectoryMessageStore, InMemoryMessageStore

    public interface MessageReadOnlyStore<K,M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField>
    extends ReadOnlyStore<K,M>
    Interface for storing messages of a single type. This is a read-only part of the store.
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default <B extends net.morimekta.providence.PMessageBuilder<M,F>>
      java.util.Map<K,B>
      getAllBuilders​(java.util.Collection<K> keys)
      Get builders for all keys requested.
      default <B extends net.morimekta.providence.PMessageBuilder<M,F>>
      B
      getBuilder​(K key)
      Get the builder representing the message on the given key.
    • Method Detail

      • getBuilder

        @Nullable
        default <B extends net.morimekta.providence.PMessageBuilder<M,F>> B getBuilder​(@Nonnull
                                                                                       K key)
        Get the builder representing the message on the given key. Any modifications to the returned builder will not be reflected onto the store.
        Type Parameters:
        B - The builder type.
        Parameters:
        key - The key to find builder for.
        Returns:
        The builder if message was found or null if not.
      • getAllBuilders

        @Nonnull
        default <B extends net.morimekta.providence.PMessageBuilder<M,F>> java.util.Map<K,B> getAllBuilders​(@Nonnull
                                                                                                            java.util.Collection<K> keys)
        Get builders for all keys requested. Any modifications to the returned builders will not be reflected onto the store. The result map fill not contain any (key -> null) entries.
        Type Parameters:
        B - The builder type.
        Parameters:
        keys - Keys to look up.
        Returns:
        The map of found entries.