Module com.github.rvesse.airline
Interface PortRange
-
- All Known Implementing Classes:
PortRangeImpl,PortType
public interface PortRangeInterface for port ranges, useful if you want to use thePortRestrictionwith a custom port range implementation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(PortRange other)Gets whether the port range contains another port range i.e.intgetMaximumPort()Gets the maximum portintgetMinimumPort()Gets the minimum portbooleaninRange(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
-
-