Module com.github.rvesse.airline
Interface PortRange
- 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 TypeMethodDescriptionboolean
Gets whether the port range contains another port range i.e.int
Gets the maximum portint
Gets the minimum portboolean
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
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
-