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 thechatJid
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
fromMe()
Returns the value of thefromMe
record component.getProperty
(List<String> list, int index) final int
hashCode()
Returns a hash code value for this object.Returns the value of themessageId
record component.static MessageIndexInfo
Constructs a new message index infostatic MessageIndexInfo
Constructs a new index info from a json stringfinal String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record 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 thetype
record component.- Returns:
- the value of the
type
record component
-
chatJid
Returns the value of thechatJid
record component.- Returns:
- the value of the
chatJid
record component
-
messageId
Returns the value of themessageId
record component.- Returns:
- the value of the
messageId
record component
-
fromMe
public boolean fromMe()Returns the value of thefromMe
record component.- Returns:
- the value of the
fromMe
record component
-