Package api.mpba.rastvdmy.dto.response
Record Class MessageResponse
java.lang.Object
java.lang.Record
api.mpba.rastvdmy.dto.response.MessageResponse
- Record Components:
 receiverEmail- The email of the message receiver.content- The content of the message.senderEmail- The email of the message sender.timestamp- The timestamp of when the message was sent.
public record MessageResponse(String receiverEmail, String content, String senderEmail, LocalDateTime timestamp)
extends Record
This class represents a response for a message in the banking system.
- 
Constructor Summary
ConstructorsConstructorDescriptionMessageResponse(String receiverEmail, String content, String senderEmail, LocalDateTime timestamp) Creates an instance of aMessageResponserecord class. - 
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord 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 thereceiverEmailrecord component.Returns the value of thesenderEmailrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class. 
- 
Constructor Details
- 
MessageResponse
public MessageResponse(String receiverEmail, String content, String senderEmail, LocalDateTime timestamp) Creates an instance of aMessageResponserecord class.- Parameters:
 receiverEmail- the value for thereceiverEmailrecord componentcontent- the value for thecontentrecord componentsenderEmail- the value for thesenderEmailrecord componenttimestamp- the value for thetimestamprecord 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. All components in this record class are compared withObjects::equals(Object,Object). - 
receiverEmail
Returns the value of thereceiverEmailrecord component.- Returns:
 - the value of the 
receiverEmailrecord component 
 - 
content
Returns the value of thecontentrecord component.- Returns:
 - the value of the 
contentrecord component 
 - 
senderEmail
Returns the value of thesenderEmailrecord component.- Returns:
 - the value of the 
senderEmailrecord component 
 - 
timestamp
Returns the value of thetimestamprecord component.- Returns:
 - the value of the 
timestamprecord component 
 
 -