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 thePortRestriction
with a custom port range implementation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(PortRange other)
Gets whether the port range contains another port range i.e.int
getMaximumPort()
Gets the maximum portint
getMinimumPort()
Gets the minimum portboolean
inRange(int port)
Gets whether a port falls within the range
-
-
-
Method Detail
-
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
-
-