Record Class WebHistoryLength

java.lang.Object
java.lang.Record
it.auties.whatsapp.api.WebHistoryLength

public record WebHistoryLength(int size) extends Record
The constants of this enumerated type describe the various chat history's codeLength that Whatsapp can send on the first login attempt
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final WebHistoryLength
     
    private final int
    The field for the size record component.
    private static final WebHistoryLength
     
    private static final WebHistoryLength
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    WebHistoryLength(int size)
    Creates an instance of a WebHistoryLength record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    custom(int size)
    Custom size
    final boolean
    Indicates whether some other object is "equal to" this one.
    This will contain most of your messages Unless you 100% know what you are doing don't use this It consumes a lot of system resources
    final int
    Returns a hash code value for this object.
    boolean
    Returns whether this history size counts as extended
    boolean
    Returns whether this history size counts as zero
    int
    Returns the value of the size record component.
    This is the default setting for the web client This is also the recommended setting
    final String
    Returns a string representation of this record class.
    Discards history This will save a lot of system resources, but you won't have access to messages sent before the session creation

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • WebHistoryLength

      public WebHistoryLength(int size)
      Creates an instance of a WebHistoryLength record class.
      Parameters:
      size - the value for the size record component
  • Method Details

    • zero

      public static WebHistoryLength zero()
      Discards history This will save a lot of system resources, but you won't have access to messages sent before the session creation
    • standard

      public static WebHistoryLength standard()
      This is the default setting for the web client This is also the recommended setting
    • extended

      public static WebHistoryLength extended()
      This will contain most of your messages Unless you 100% know what you are doing don't use this It consumes a lot of system resources
    • custom

      public static WebHistoryLength custom(int size)
      Custom size
    • isZero

      public boolean isZero()
      Returns whether this history size counts as zero
      Returns:
      a boolean
    • isExtended

      public boolean isExtended()
      Returns whether this history size counts as extended
      Returns:
      a boolean
    • 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 '=='.
      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.
    • size

      public int size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component