public interface MsgGet extends OriginalAble, ThisCodeAble, RootBean
Modifier and Type | Method and Description |
---|---|
String |
getFont()
获取消息的字体
|
String |
getId()
获取ID, 一般用于消息类型判断
|
String |
getMsg()
一般来讲,监听到的消息大部分都会有个“消息内容”。定义此方法获取消息内容。
如果不存在,则为null。(旧版本推荐为空字符串,现在不了。我变卦了)
|
Long |
getTime()
获取到的时间, 代表某一时间的秒值。一般情况下是秒值。如果类型不对请自行转化
|
default LocalDateTime |
getTimeToLocalDateTime()
将时间作为秒值之间戳转化为LocalDateTime
|
default void |
setMsg(Function<String,String> updateMsg)
根据当前的msg来更新msg信息。
oldMsg -> newMsg
|
void |
setMsg(String newMsg)
重新设置消息
|
getOriginalData
getThisCode, setThisCode
getOtherParam, getOtherParam
String getId()
String getMsg()
void setMsg(String newMsg)
newMsg
- msgdefault void setMsg(Function<String,String> updateMsg)
updateMsg
- msg更新函数String getFont()
Long getTime()
default LocalDateTime getTimeToLocalDateTime()
Copyright © 2020. All rights reserved.