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

  • All Superinterfaces:
    ReadOnlyStore<K,java.util.List<M>>
    All Known Subinterfaces:
    MessageListStore<K,M,F>
    All Known Implementing Classes:
    DirectoryMessageListStore, InMemoryMessageListStore

    public interface MessageListReadOnlyStore<K,M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField>
    extends ReadOnlyStore<K,java.util.List<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,java.util.List<B>>
      getAllBuilders​(java.util.Collection<K> keys)
      Get map of lists of builders for all the messages for the requested keys.
      default <B extends net.morimekta.providence.PMessageBuilder<M,F>>
      java.util.List<B>
      getBuilders​(K key)
      Get a list of builders for the entry stored.
    • Method Detail

      • getBuilders

        @Nullable
        default <B extends net.morimekta.providence.PMessageBuilder<M,F>> java.util.List<B> getBuilders​(@Nonnull
                                                                                                        K key)
        Get a list of builders for the entry stored. Any modifications to the returned builders will not be reflected onto the store.
        Type Parameters:
        B - The builder type.
        Parameters:
        key - The key to look up.
        Returns:
        List of builders for stored on the key or null if not found.
      • getAllBuilders

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