Record Class UserChatInfo
java.lang.Object
java.lang.Record
io.github.seenings.chat.model.UserChatInfo
- Record Components:
userId- 用户IDaliasName- 用户昵称sex- 1男2女mainPhotoId- 头像照片IDnewestChatText- 最新的聊天文本newestChatTime- 最新的聊天发送时间
-
Constructor Summary
ConstructorsConstructorDescriptionUserChatInfo(Long userId, String aliasName, Sex sex, Integer mainPhotoId, String newestChatText, LocalDateTime newestChatTime) Creates an instance of aUserChatInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealiasNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themainPhotoIdrecord component.Returns the value of thenewestChatTextrecord component.Returns the value of thenewestChatTimerecord component.sex()Returns the value of thesexrecord component.final StringtoString()Returns a string representation of this record class.userId()Returns the value of theuserIdrecord component.
-
Constructor Details
-
UserChatInfo
public UserChatInfo(Long userId, String aliasName, Sex sex, Integer mainPhotoId, String newestChatText, LocalDateTime newestChatTime) Creates an instance of aUserChatInforecord class.- Parameters:
userId- the value for theuserIdrecord componentaliasName- the value for thealiasNamerecord componentsex- the value for thesexrecord componentmainPhotoId- the value for themainPhotoIdrecord componentnewestChatText- the value for thenewestChatTextrecord componentnewestChatTime- the value for thenewestChatTimerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
userId
-
aliasName
-
sex
-
mainPhotoId
Returns the value of themainPhotoIdrecord component.- Returns:
- the value of the
mainPhotoIdrecord component
-
newestChatText
Returns the value of thenewestChatTextrecord component.- Returns:
- the value of the
newestChatTextrecord component
-
newestChatTime
Returns the value of thenewestChatTimerecord component.- Returns:
- the value of the
newestChatTimerecord component
-