java.lang.Object
java.lang.Record
it.auties.whatsapp.api.WebHistoryLength
The constants of this enumerated type describe the various chat history's codeLength that Whatsapp
can send on the first login attempt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final WebHistoryLengthprivate final intThe field for thesizerecord component.private static final WebHistoryLengthprivate static final WebHistoryLength -
Constructor Summary
ConstructorsConstructorDescriptionWebHistoryLength(int size) Creates an instance of aWebHistoryLengthrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebHistoryLengthcustom(int size) Custom sizefinal booleanIndicates whether some other object is "equal to" this one.static WebHistoryLengthextended()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 resourcesfinal inthashCode()Returns a hash code value for this object.booleanReturns whether this history size counts as extendedbooleanisZero()Returns whether this history size counts as zerointsize()Returns the value of thesizerecord component.static WebHistoryLengthstandard()This is the default setting for the web client This is also the recommended settingfinal StringtoString()Returns a string representation of this record class.static WebHistoryLengthzero()Discards history This will save a lot of system resources, but you won't have access to messages sent before the session creation
-
Field Details
-
size
private final int sizeThe field for thesizerecord component. -
ZERO
-
STANDARD
-
EXTENDED
-
-
Constructor Details
-
WebHistoryLength
public WebHistoryLength(int size) Creates an instance of aWebHistoryLengthrecord class.- Parameters:
size- the value for thesizerecord component
-
-
Method Details
-
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
This is the default setting for the web client This is also the recommended setting -
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
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
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 with '=='. -
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-