Record Class PhotoChange

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.sync.PhotoChange
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject

public record PhotoChange(byte[] oldPhoto, byte[] newPhoto, Integer newPhotoId) extends Record implements it.auties.protobuf.model.ProtobufMessage
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte[]
    The field for the newPhoto record component.
    private final Integer
    The field for the newPhotoId record component.
    private final byte[]
    The field for the oldPhoto record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PhotoChange(byte[] oldPhoto, byte[] newPhoto, Integer newPhotoId)
    Creates an instance of a PhotoChange record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    byte[]
    Returns the value of the newPhoto record component.
    Returns the value of the newPhotoId record component.
    byte[]
    Returns the value of the oldPhoto record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • oldPhoto

      private final byte[] oldPhoto
      The field for the oldPhoto record component.
    • newPhoto

      private final byte[] newPhoto
      The field for the newPhoto record component.
    • newPhotoId

      private final Integer newPhotoId
      The field for the newPhotoId record component.
  • Constructor Details

    • PhotoChange

      public PhotoChange(byte[] oldPhoto, byte[] newPhoto, Integer newPhotoId)
      Creates an instance of a PhotoChange record class.
      Parameters:
      oldPhoto - the value for the oldPhoto record component
      newPhoto - the value for the newPhoto record component
      newPhotoId - the value for the newPhotoId record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • oldPhoto

      public byte[] oldPhoto()
      Returns the value of the oldPhoto record component.
      Returns:
      the value of the oldPhoto record component
    • newPhoto

      public byte[] newPhoto()
      Returns the value of the newPhoto record component.
      Returns:
      the value of the newPhoto record component
    • newPhotoId

      public Integer newPhotoId()
      Returns the value of the newPhotoId record component.
      Returns:
      the value of the newPhotoId record component