Class PortRange

java.lang.Object
com.hazelcast.spi.utils.PortRange

public final class PortRange extends Object
Represents the range of IPv4 Ports.
  • Constructor Details

    • PortRange

      public PortRange(String spec)
      Creates PortRange from the spec String.
      Parameters:
      spec - port number (e.g "5701") or port range (e.g. "5701-5708")
      Throws:
      IllegalArgumentException - if the specified spec is not a valid port or port range
  • Method Details

    • getFromPort

      public int getFromPort()
    • getToPort

      public int getToPort()
    • toString

      public String toString()
      Overrides:
      toString in class Object