public class PortRangeImpl extends Object implements PortRange, Comparable<PortRange>
| Constructor and Description |
|---|
PortRangeImpl(int min,
int max)
Creates a new port range
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PortRange other) |
boolean |
contains(PortRange other)
Gets whether the port range contains another port range i.e.
|
int |
getMaximumPort()
Gets the maximum port
|
int |
getMinimumPort()
Gets the minimum port
|
boolean |
inRange(int port)
Gets whether a port falls within the range
|
String |
toString() |
public PortRangeImpl(int min,
int max)
min - Minimummax - Maximumpublic int getMinimumPort()
PortRangegetMinimumPort in interface PortRangepublic int getMaximumPort()
PortRangegetMaximumPort in interface PortRangepublic boolean inRange(int port)
PortRangepublic boolean contains(PortRange other)
PortRangepublic int compareTo(PortRange other)
compareTo in interface Comparable<PortRange>Copyright © 2012–2022. All rights reserved.