Class MessageMetaData


  • public class MessageMetaData
    extends Object
    Message meta-data.
    • Constructor Detail

      • MessageMetaData

        public MessageMetaData()
        Constructs a new instance.
    • Method Detail

      • get

        public <T> T get​(MessageMetaData.Key<T> key)
        Returns the value of the specified key. Returns null if such key doesn't exist.
        Type Parameters:
        T - Value type.
        Parameters:
        key - Key.
        Returns:
        Value for the specified key or null.
      • set

        public <T> void set​(MessageMetaData.Key<T> key,
                            T value)
        Sets the key/value pair. If key already exists then its value will be overwritten.
        Type Parameters:
        T - Value type.
        Parameters:
        key - Key.
        value - Value.
      • size

        public int size()
        Returns the amount of key/value pairs of this instance.
        Returns:
        Amount of key/value pairs of this instance.
      • isEmpty

        public boolean isEmpty()
        Returns true if this instance doesn't hold any key/value pairs.
        Returns:
        true if this instance doesn't hold any key/value pairs.