Package vaultWeb.dtos.dashboard
Record Class UserDashboardDto.ProfileSummary
java.lang.Object
java.lang.Record
vaultWeb.dtos.dashboard.UserDashboardDto.ProfileSummary
- Enclosing class:
UserDashboardDto
-
Constructor Summary
ConstructorsConstructorDescriptionProfileSummary(Long id, String username, int groupCount, int privateChatCount, long messagesSent) Creates an instance of aProfileSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegroupCountrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.longReturns the value of themessagesSentrecord component.intReturns the value of theprivateChatCountrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
ProfileSummary
public ProfileSummary(Long id, String username, int groupCount, int privateChatCount, long messagesSent) Creates an instance of aProfileSummaryrecord class.- Parameters:
id- the value for theidrecord componentusername- the value for theusernamerecord componentgroupCount- the value for thegroupCountrecord componentprivateChatCount- the value for theprivateChatCountrecord componentmessagesSent- the value for themessagesSentrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
groupCount
public int groupCount()Returns the value of thegroupCountrecord component.- Returns:
- the value of the
groupCountrecord component
-
privateChatCount
public int privateChatCount()Returns the value of theprivateChatCountrecord component.- Returns:
- the value of the
privateChatCountrecord component
-
messagesSent
public long messagesSent()Returns the value of themessagesSentrecord component.- Returns:
- the value of the
messagesSentrecord component
-