Class MessageChain

    • Constructor Detail

      • MessageChain

        public MessageChain​(@NotNull
                            @NotNull Message message)
    • Method Detail

      • iterator

        @NotNull
        public @NotNull Iterator<Message> iterator()
        Get the iterator of this message chain
        Specified by:
        iterator in interface Iterable<Message>
        Returns:
        the iterator of this message chain
      • stream

        public java.util.stream.Stream<Message> stream()
        Get the stream of this message chain
        Returns:
        the stream of this message chain
      • get

        public Message get​(int index)
        Get the message at the specified index
        Parameters:
        index - the specified index
        Returns:
        the message at the specified index
      • size

        public int size()
        Get the size of this message chain
        Returns:
        the size of this message chain
      • toString

        public String toString()
        Description copied from interface: Message
        Get the string representation of this message.
        Specified by:
        toString in interface Message
        Overrides:
        toString in class Object
        Returns:
        the string representation of this message
      • isEmpty

        public boolean isEmpty()
        Indicates whether this message chain is empty
        Returns:
        true if this message chain is empty, false otherwise
      • toMiraiCode

        public String toMiraiCode()
        Description copied from interface: Message
        Get the mirai code of this message.
        Specified by:
        toMiraiCode in interface Message
        Returns:
        the mirai code of this message