Record Class ChatUser
java.lang.Object
java.lang.Record
io.github.seenings.chat.model.ChatUser
public record ChatUser(Integer id, Long userId, Long friendUserId, LocalDateTime updateTime)
extends Record
ChatUser
- Since:
- 2023-01-01
- Author:
- chixuehui
-
Constructor Summary
ConstructorsConstructorDescriptionChatUser(Integer id, Long userId, Long friendUserId, LocalDateTime updateTime) Creates an instance of aChatUserrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefriendUserIdrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdateTimerecord component.userId()Returns the value of theuserIdrecord component.
-
Constructor Details
-
ChatUser
Creates an instance of aChatUserrecord class.- Parameters:
id- the value for theidrecord componentuserId- the value for theuserIdrecord componentfriendUserId- the value for thefriendUserIdrecord componentupdateTime- the value for theupdateTimerecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
userId
Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
friendUserId
Returns the value of thefriendUserIdrecord component.- Returns:
- the value of the
friendUserIdrecord component
-
updateTime
Returns the value of theupdateTimerecord component.- Returns:
- the value of the
updateTimerecord component
-