Package top.focess.qq.api.bot.message
Class MessageChain
- java.lang.Object
-
- top.focess.qq.api.bot.message.MessageChain
-
-
Constructor Summary
Constructors Constructor Description MessageChain(@NotNull Message message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Messageget(int index)Get the message at the specified indexbooleanisEmpty()Indicates whether this message chain is empty@NotNull Iterator<Message>iterator()Get the iterator of this message chainintsize()Get the size of this message chainjava.util.stream.Stream<Message>stream()Get the stream of this message chainStringtoMiraiCode()Get the mirai code of this message.StringtoString()Get the string representation of this message.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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
-
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:MessageGet 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:MessageGet the mirai code of this message.- Specified by:
toMiraiCodein interfaceMessage- Returns:
- the mirai code of this message
-
-