java.lang.Object
org.klomp.snark.UDPTrackerClient.HostPort
Direct Known Subclasses:
UDPTrackerClient.Tracker
Enclosing class:
UDPTrackerClient

private static class UDPTrackerClient.HostPortextends Object
A tracker host and port.
  • Field Details

    • host

      protected final String host
      The tracker host name.
    • port

      protected final int port
      The tracker port.
  • Constructor Details

    • HostPort

      public HostPort(String host, int port)
      Create a host/port pair.
      Parameters:
      host - the tracker host
      port - the announce port
  • Method Details

    • getPort

      public int getPort()
      The announce port.
      Returns:
      the port advertised in the announce
    • hashCode

      public int hashCode()
      Whether hash code is present.
      Overrides:
      hashCode in class Object
      Returns:
      whether h code is present
    • equals

      public boolean equals(Object o)
      Whether this equals the other.
      Overrides:
      equals in class Object
    • toString

      public String toString()
      String form of the host/port pair.
      Overrides:
      toString in class Object