All Known Implementing Classes:
PortRangeImpl, PortType

public interface PortRange
Interface for port ranges, useful if you want to use the PortRestriction with a custom port range implementation
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets whether the port range contains another port range i.e.
    int
    Gets the maximum port
    int
    Gets the minimum port
    boolean
    inRange(int port)
    Gets whether a port falls within the range
  • Method Details

    • getMinimumPort

      int getMinimumPort()
      Gets the minimum port
      Returns:
      Minimum port
    • getMaximumPort

      int getMaximumPort()
      Gets the maximum port
      Returns:
      Maximum port
    • inRange

      boolean inRange(int port)
      Gets whether a port falls within the range
      Parameters:
      port - Port
      Returns:
      True if in range, false otherwise
    • contains

      boolean contains(PortRange other)
      Gets whether the port range contains another port range i.e. does this cover at least the same range of ports as the other
      Parameters:
      other - Other port type
      Returns:
      True if this covers at least the same range of ports as the other, false otherwise