Class MessageStoreUtils


  • @Deprecated
    public class MessageStoreUtils
    extends java.lang.Object
    Deprecated.
    Use MessageUtil methods instead. This class will be removed in a future major release.
    Utilities for message store implementations and interfaces.
    • Constructor Detail

      • MessageStoreUtils

        public MessageStoreUtils()
        Deprecated.
    • Method Detail

      • toMessageAll

        public static <M extends PMessage<M>,​V extends PMessageOrBuilder<M>> java.util.List<M> toMessageAll​(java.util.Collection<V> builders)
        Deprecated.
        Build all items of the collection containing builders. The list must not contain any null items.
        Type Parameters:
        M - The message type.
        V - The actual value type.
        Parameters:
        builders - List of builders.
        Returns:
        List of messages or null if null input.
      • toBuilderAll

        public static <M extends PMessage<M>,​V extends PMessageOrBuilder<M>,​B extends PMessageBuilder<M>> java.util.List<B> toBuilderAll​(java.util.Collection<V> messages)
        Deprecated.
        Mutate all items of the collection containing messages. The list must not contain any null items.
        Type Parameters:
        M - The message type.
        V - The actual value type.
        B - The builder type.
        Parameters:
        messages - List of messages
        Returns:
        List of builders or null if null input.
      • toBuilderValues

        public static <K,​M extends PMessage<M>,​V extends PMessageOrBuilder<M>,​B extends PMessageBuilder<M>> java.util.Map<K,​B> toBuilderValues​(java.util.Map<K,​V> messages)
        Deprecated.
        Mutate all items of the collection containing messages. The list must not contain any null items.
        Type Parameters:
        K - The map key type.
        M - The message type.
        V - The actual value type.
        B - The builder type.
        Parameters:
        messages - List of messages
        Returns:
        List of builders or null if null input.
      • toMessageValues

        public static <K,​M extends PMessage<M>,​V extends PMessageOrBuilder<M>> java.util.Map<K,​M> toMessageValues​(java.util.Map<K,​V> messages)
        Deprecated.
        Mutate all items of the collection containing messages. The list must not contain any null items.
        Type Parameters:
        K - The map key type.
        M - The message type.
        V - The actual value type.
        Parameters:
        messages - List of messages
        Returns:
        List of builders or null if null input.
      • toMessageIfNotNull

        public static <M extends PMessage<M>> M toMessageIfNotNull​(PMessageOrBuilder<M> mob)
        Deprecated.
        Build the message from builder if it is not null.
        Type Parameters:
        M - The message type.
        Parameters:
        mob - The builder to build.
        Returns:
        The message or null if null input.
      • toBuilderIfNonNull

        public static <M extends PMessage<M>,​B extends PMessageBuilder<M>> B toBuilderIfNonNull​(PMessageOrBuilder<M> mob)
        Deprecated.
        Mutate the message if it is not null.
        Type Parameters:
        M - The message type.
        B - The builder type.
        Parameters:
        mob - Message or builder to mutate.
        Returns:
        The builder or null if null input.