Module com.github.rvesse.airline
Class PortRangeImpl
- java.lang.Object
-
- com.github.rvesse.airline.restrictions.common.PortRangeImpl
-
-
Constructor Summary
Constructors Constructor Description PortRangeImpl(int min, int max)
Creates a new port range
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 portint
getMinimumPort()
Gets the minimum portboolean
inRange(int port)
Gets whether a port falls within the rangejava.lang.String
toString()
-
-
-
Method Detail
-
getMinimumPort
public int getMinimumPort()
Description copied from interface:PortRange
Gets the minimum port- Specified by:
getMinimumPort
in interfacePortRange
- Returns:
- Minimum port
-
getMaximumPort
public int getMaximumPort()
Description copied from interface:PortRange
Gets the maximum port- Specified by:
getMaximumPort
in interfacePortRange
- Returns:
- Maximum port
-
inRange
public boolean inRange(int port)
Description copied from interface:PortRange
Gets whether a port falls within the range
-
contains
public boolean contains(PortRange other)
Description copied from interface:PortRange
Gets whether the port range contains another port range i.e. does this cover at least the same range of ports as the other
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-