java.lang.Object
java.lang.Record
it.auties.whatsapp.model.signal.session.Session
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSession()
Session
(ConcurrentLinkedDeque<@NonNull SessionState> states) Creates an instance of aSession
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addState
(SessionState state) static Session.SessionBuilder
builder()
final boolean
Indicates whether some other object is "equal to" this one.findState
(int version, byte[] baseKey) final int
hashCode()
Returns a hash code value for this object.boolean
hasState
(int version, byte[] baseKey) ConcurrentLinkedDeque<@NonNull SessionState>
states()
Returns the value of thestates
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Session
public Session() -
Session
Creates an instance of aSession
record class.- Parameters:
states
- the value for thestates
record component
-
-
Method Details
-
currentState
-
closeCurrentState
-
hasState
public boolean hasState(int version, byte[] baseKey) -
findState
-
addState
-
builder
-
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 withObjects::equals(Object,Object)
. -
states
Returns the value of thestates
record component.- Returns:
- the value of the
states
record component
-