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 intcompareTo(PortRange other)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 rangejava.lang.StringtoString()
-
-
-
Method Detail
-
getMinimumPort
public int getMinimumPort()
Description copied from interface:PortRangeGets the minimum port- Specified by:
getMinimumPortin interfacePortRange- Returns:
- Minimum port
-
getMaximumPort
public int getMaximumPort()
Description copied from interface:PortRangeGets the maximum port- Specified by:
getMaximumPortin interfacePortRange- Returns:
- Maximum port
-
inRange
public boolean inRange(int port)
Description copied from interface:PortRangeGets whether a port falls within the range
-
contains
public boolean contains(PortRange other)
Description copied from interface:PortRangeGets 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:
toStringin classjava.lang.Object
-
-