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 WebHistoryLength
private final int
The field for thesize
record component.private static final WebHistoryLength
private static final WebHistoryLength
-
Constructor Summary
ConstructorsConstructorDescriptionWebHistoryLength
(int size) Creates an instance of aWebHistoryLength
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebHistoryLength
custom
(int size) Custom sizefinal boolean
Indicates whether some other object is "equal to" this one.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 resourcesfinal int
hashCode()
Returns a hash code value for this object.boolean
Returns whether this history size counts as extendedboolean
isZero()
Returns whether this history size counts as zeroint
size()
Returns the value of thesize
record component.static WebHistoryLength
standard()
This is the default setting for the web client This is also the recommended settingfinal String
toString()
Returns a string representation of this record class.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
-
Field Details
-
size
private final int sizeThe field for thesize
record component. -
ZERO
-
STANDARD
-
EXTENDED
-
-
Constructor Details
-
WebHistoryLength
public WebHistoryLength(int size) Creates an instance of aWebHistoryLength
record class.- Parameters:
size
- the value for thesize
record 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 thesize
record component.- Returns:
- the value of the
size
record component
-