Package com.soulfiremc.server.proxy
Record Class SFProxy
java.lang.Object
java.lang.Record
com.soulfiremc.server.proxy.SFProxy
public record SFProxy(@NonNull ProxyType type, @NonNull SocketAddress address, @Nullable String username, @Nullable String password)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSFProxy
(@NonNull ProxyType type, @NonNull SocketAddress address, @Nullable String username, @Nullable String password) Creates an instance of aSFProxy
record class. -
Method Summary
Modifier and TypeMethodDescription@NonNull SocketAddress
address()
Returns the value of theaddress
record component.final boolean
Indicates whether some other object is "equal to" this one.static SFProxy
fromProto
(ProxyProto proto) final int
hashCode()
Returns a hash code value for this object.@Nullable String
password()
Returns the value of thepassword
record component.toProto()
final String
toString()
Returns a string representation of this record class.@NonNull ProxyType
type()
Returns the value of thetype
record component.@Nullable String
username()
Returns the value of theusername
record component.
-
Constructor Details
-
SFProxy
public SFProxy(@NonNull @NonNull ProxyType type, @NonNull @NonNull SocketAddress address, @Nullable String username, @Nullable String password) Creates an instance of aSFProxy
record class.- Parameters:
type
- the value for thetype
record componentaddress
- the value for theaddress
record componentusername
- the value for theusername
record componentpassword
- the value for thepassword
record component
-
-
Method Details
-
fromProto
-
getSocketAddress
-
toProto
-
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)
. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
address
Returns the value of theaddress
record component.- Returns:
- the value of the
address
record component
-
username
Returns the value of theusername
record component.- Returns:
- the value of the
username
record component
-
password
Returns the value of thepassword
record component.- Returns:
- the value of the
password
record component
-