Record Class ScxWebSocketCloseInfoImpl
java.lang.Object
java.lang.Record
cool.scx.http.web_socket.ScxWebSocketCloseInfoImpl
- All Implemented Interfaces:
ScxWebSocketCloseInfo
public record ScxWebSocketCloseInfoImpl(int code, String reason)
extends Record
implements ScxWebSocketCloseInfo
ScxWebSocketCloseInfoImpl
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionScxWebSocketCloseInfoImpl(int code, String reason) Creates an instance of aScxWebSocketCloseInfoImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScxWebSocketCloseInfoImpl
Creates an instance of aScxWebSocketCloseInfoImplrecord class.- Parameters:
code- the value for thecoderecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
code
public int code()Returns the value of thecoderecord component.- Specified by:
codein interfaceScxWebSocketCloseInfo- Returns:
- the value of the
coderecord component
-
reason
Returns the value of thereasonrecord component.- Specified by:
reasonin interfaceScxWebSocketCloseInfo- Returns:
- the value of the
reasonrecord component
-