Record Class NetherNetChannel.Path

java.lang.Object
java.lang.Record
org.cloudburstmc.netty.channel.nethernet.NetherNetChannel.Path
Enclosing class:
NetherNetChannel

public static record NetherNetChannel.Path(InetSocketAddress local, String localType, InetSocketAddress remote, String remoteType) extends Record
One side of the selected pair carries the address the socket uses and the candidate type it was gathered as: host, srflx, prflx or relay. A type is null when the description names no candidate at that address.
  • Constructor Details

    • Path

      public Path(InetSocketAddress local, String localType, InetSocketAddress remote, String remoteType)
      Creates an instance of a Path record class.
      Parameters:
      local - the value for the local record component
      localType - the value for the localType record component
      remote - the value for the remote record component
      remoteType - the value for the remoteType record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • local

      public InetSocketAddress local()
      Returns the value of the local record component.
      Returns:
      the value of the local record component
    • localType

      public String localType()
      Returns the value of the localType record component.
      Returns:
      the value of the localType record component
    • remote

      public InetSocketAddress remote()
      Returns the value of the remote record component.
      Returns:
      the value of the remote record component
    • remoteType

      public String remoteType()
      Returns the value of the remoteType record component.
      Returns:
      the value of the remoteType record component