Record Class Http1StatusLine
java.lang.Object
java.lang.Record
cool.scx.http.x.http1.status_line.Http1StatusLine
-
Constructor Summary
ConstructorsConstructorDescriptionHttp1StatusLine(HttpVersion version, int code, String reason) Creates an instance of aHttp1StatusLinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the value of thecoderecord component.encode()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static Http1StatusLinereason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
Http1StatusLine
Creates an instance of aHttp1StatusLinerecord class.- Parameters:
version- the value for theversionrecord componentcode- the value for thecoderecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
of
public static Http1StatusLine of(String statusLineStr) throws InvalidHttpStatusLineException, InvalidHttpStatusException, InvalidHttpVersion -
encode
-
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. -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
code
public int code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-