java.lang.Object
java.lang.Record
it.auties.whatsapp.model.info.MessageIndexInfo
- Record Components:
type- the type of the changechatJid- the chat where the change happenedmessageId- the nullable id of the message regarding the chanefromMe- whether the change regards yourself
- All Implemented Interfaces:
Info
public record MessageIndexInfo(String type, Optional<Jid> chatJid, Optional<String> messageId, boolean fromMe)
extends Record
implements Info
An index that contains data about a setting change or an action
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchatJid()Returns the value of thechatJidrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfromMe()Returns the value of thefromMerecord component.getProperty(List<String> list, int index) final inthashCode()Returns a hash code value for this object.Returns the value of themessageIdrecord component.static MessageIndexInfoConstructs a new message index infostatic MessageIndexInfoConstructs a new index info from a json stringfinal StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
Constructor Details
-
Method Details
-
of
Constructs a new message index info- Parameters:
type- the type of the changechatJid- the chat where the change happenedmessageId- the nullable id of the message regarding the chanefromMe- whether the change regards yourself- Returns:
- a non-null message index info
-
ofJson
Constructs a new index info from a json string- Parameters:
json- the non-null json string- Returns:
- a non-null index info
-
getProperty
-
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
chatJid
Returns the value of thechatJidrecord component.- Returns:
- the value of the
chatJidrecord component
-
messageId
Returns the value of themessageIdrecord component.- Returns:
- the value of the
messageIdrecord component
-
fromMe
public boolean fromMe()Returns the value of thefromMerecord component.- Returns:
- the value of the
fromMerecord component
-