Record Class SourcedAddress
java.lang.Object
java.lang.Record
org.cloudburstmc.netty.channel.nethernet.SourcedAddress
- Record Components:
address- The addresssource- Where it came fromvia- The proxy, forwarder or relay that declared it, when another party did and is known
public record SourcedAddress(InetSocketAddress address, AddressSource source, @Nullable InetSocketAddress via)
extends Record
A peer's address and where it came from.
-
Constructor Summary
ConstructorsConstructorDescriptionSourcedAddress(InetSocketAddress address, AddressSource source, @Nullable InetSocketAddress via) Creates an instance of aSourcedAddressrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.@Nullable InetSocketAddressvia()Returns the value of theviarecord component.
-
Constructor Details
-
SourcedAddress
public SourcedAddress(InetSocketAddress address, AddressSource source, @Nullable InetSocketAddress via) Creates an instance of aSourcedAddressrecord class.
-
-
Method Details
-
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). -
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
via
Returns the value of theviarecord component.- Returns:
- the value of the
viarecord component
-