Module ch.rasc.jcentserverclient
Package ch.rasc.jcentserverclient.models
Record Class ConnectionInfo
java.lang.Object
java.lang.Record
ch.rasc.jcentserverclient.models.ConnectionInfo
public record ConnectionInfo(String appName, String appVersion, String transport, String protocol, String user, ConnectionState state)
extends Record
Connection information.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConnectionInfo(String appName, String appVersion, String transport, String protocol, String user, ConnectionState state) Creates an instance of aConnectionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionappName()Returns the value of theappNamerecord component.Returns the value of theappVersionrecord component.static ConnectionInfo.Builderbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.protocol()Returns the value of theprotocolrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransportrecord component.user()Returns the value of theuserrecord component.
-
Constructor Details
-
ConnectionInfo
public ConnectionInfo(String appName, String appVersion, String transport, String protocol, String user, ConnectionState state) Creates an instance of aConnectionInforecord class.- Parameters:
appName- the value for theappNamerecord componentappVersion- the value for theappVersionrecord componenttransport- the value for thetransportrecord componentprotocol- the value for theprotocolrecord componentuser- the value for theuserrecord componentstate- the value for thestaterecord component
-
-
Method Details
-
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). -
appName
Returns the value of theappNamerecord component.- Returns:
- the value of the
appNamerecord component
-
appVersion
Returns the value of theappVersionrecord component.- Returns:
- the value of the
appVersionrecord component
-
transport
Returns the value of thetransportrecord component.- Returns:
- the value of the
transportrecord component
-
protocol
Returns the value of theprotocolrecord component.- Returns:
- the value of the
protocolrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-